pub struct StaticFunction {
pub signature: FunctionSignature,
pub implementation: Rc<dyn Fn(Arguments<'_>) -> Result<Variable>>,
}
Fields§
§signature: FunctionSignature
§implementation: Rc<dyn Fn(Arguments<'_>) -> Result<Variable>>
Trait Implementations§
Source§impl Clone for StaticFunction
impl Clone for StaticFunction
Source§fn clone(&self) -> StaticFunction
fn clone(&self) -> StaticFunction
Returns a duplicate 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 FunctionDefinition for StaticFunction
impl FunctionDefinition for StaticFunction
fn required_parameters(&self) -> usize
fn optional_parameters(&self) -> usize
fn check_types(&self, args: &[VariableType]) -> FunctionTypecheck
fn call(&self, args: Arguments<'_>) -> Result<Variable>
fn param_type(&self, index: usize) -> Option<VariableType>
fn param_type_str(&self, index: usize) -> String
fn return_type(&self) -> VariableType
fn return_type_str(&self) -> String
Auto Trait Implementations§
impl Freeze for StaticFunction
impl !RefUnwindSafe for StaticFunction
impl !Send for StaticFunction
impl !Sync for StaticFunction
impl Unpin for StaticFunction
impl !UnwindSafe for StaticFunction
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