pub struct Builtin {
pub id: Identifier,
pub parameters: Option<ParameterValueList>,
pub f: &'static BuiltinFn,
}
Expand description
Builtin function struct
Fields§
§id: Identifier
Name of the builtin function
parameters: Option<ParameterValueList>
Optional parameter value list to check the builtin signature.
f: &'static BuiltinFn
Functor to evaluate this function
Implementations§
Trait Implementations§
Source§impl CallTrait for Builtin
impl CallTrait for Builtin
Source§fn call(
&self,
args: &ArgumentValueList,
context: &mut Context,
) -> EvalResult<Value>
fn call( &self, args: &ArgumentValueList, context: &mut Context, ) -> EvalResult<Value>
Call builtin function with given parameter
§Arguments
args
: Function argumentscontext
: Execution context
Auto Trait Implementations§
impl Freeze for Builtin
impl !RefUnwindSafe for Builtin
impl !Send for Builtin
impl !Sync for Builtin
impl Unpin for Builtin
impl !UnwindSafe for Builtin
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more