pub struct Function<T: VariantValue> { /* private fields */ }Implementations§
Source§impl<T: VariantValue> Function<T>
impl<T: VariantValue> Function<T>
Sourcepub fn new(
name: &'static str,
argument_types: Vec<SPathType>,
result_type: SPathType,
evaluator: Evaluator<T>,
) -> Self
pub fn new( name: &'static str, argument_types: Vec<SPathType>, result_type: SPathType, evaluator: Evaluator<T>, ) -> Self
Create a new function instance.
Sourcepub fn argument_types(&self) -> &[SPathType]
pub fn argument_types(&self) -> &[SPathType]
The declared types of function’s arguments.
Sourcepub fn result_type(&self) -> SPathType
pub fn result_type(&self) -> SPathType
The return type of the function.
Sourcepub fn evaluate<'a>(&self, args: Vec<SPathValue<'a, T>>) -> SPathValue<'a, T>
pub fn evaluate<'a>(&self, args: Vec<SPathValue<'a, T>>) -> SPathValue<'a, T>
Evaluate the function with args.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Function<T>
impl<T> !RefUnwindSafe for Function<T>
impl<T> !Send for Function<T>
impl<T> !Sync for Function<T>
impl<T> Unpin for Function<T>
impl<T> !UnwindSafe for Function<T>
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