Enum brane_ast::spec::BuiltinFunctions
source · pub enum BuiltinFunctions {
Print,
PrintLn,
Len,
CommitResult,
}
Expand description
Defines the builtin functions that exist in BraneScript.
Variants§
The print-function, which prints some text to stdout.
PrintLn
The println-function, which does the same as Print
but now with a newline appended to the text.
Len
The len-function, which returns the length of an array.
CommitResult
The commit_builtin-function, which turns an IntermediateResult into a Data.
Implementations§
source§impl BuiltinFunctions
impl BuiltinFunctions
sourcepub fn signature(&self) -> FunctionSignature
pub fn signature(&self) -> FunctionSignature
Returns the signature of this specific builtin.
sourcepub fn all_into_state() -> [FunctionState; 4]
pub fn all_into_state() -> [FunctionState; 4]
Returns an Array with all of the builtin functions but already casted to FunctionStates.
sourcepub fn is_builtin(name: impl AsRef<str>) -> bool
pub fn is_builtin(name: impl AsRef<str>) -> bool
Checks if the given string is a builtin.
Trait Implementations§
source§impl Clone for BuiltinFunctions
impl Clone for BuiltinFunctions
source§fn clone(&self) -> BuiltinFunctions
fn clone(&self) -> BuiltinFunctions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BuiltinFunctions
impl Debug for BuiltinFunctions
source§impl From<BuiltinFunctions> for FunctionState
impl From<BuiltinFunctions> for FunctionState
source§fn from(value: BuiltinFunctions) -> Self
fn from(value: BuiltinFunctions) -> Self
Converts to this type from the input type.
source§impl IntoEnumIterator for BuiltinFunctions
impl IntoEnumIterator for BuiltinFunctions
type Iterator = BuiltinFunctionsIter
fn iter() -> BuiltinFunctionsIter ⓘ
impl Copy for BuiltinFunctions
Auto Trait Implementations§
impl Freeze for BuiltinFunctions
impl RefUnwindSafe for BuiltinFunctions
impl Send for BuiltinFunctions
impl Sync for BuiltinFunctions
impl Unpin for BuiltinFunctions
impl UnwindSafe for BuiltinFunctions
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request