pub struct CompositeFunction {
pub signatures: Vec<FunctionSignature>,
pub implementation: Rc<dyn Fn(Arguments<'_>) -> Result<Variable>>,
}
Fields§
§signatures: Vec<FunctionSignature>
§implementation: Rc<dyn Fn(Arguments<'_>) -> Result<Variable>>
Trait Implementations§
Source§impl Clone for CompositeFunction
impl Clone for CompositeFunction
Source§fn clone(&self) -> CompositeFunction
fn clone(&self) -> CompositeFunction
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 CompositeFunction
impl FunctionDefinition for CompositeFunction
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 CompositeFunction
impl !RefUnwindSafe for CompositeFunction
impl !Send for CompositeFunction
impl !Sync for CompositeFunction
impl Unpin for CompositeFunction
impl !UnwindSafe for CompositeFunction
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