pub struct NormalizedFunction {
inner_fn: Box<dyn Fn(&mut FunctionContext<'_, '_, '_>) -> Option<LangResult<ObjectRef>>>,
required_parameter_fn: Box<dyn Fn(&TypeContext) -> Option<Vec<Vec<ClassRef>>>>,
}
Fields§
§inner_fn: Box<dyn Fn(&mut FunctionContext<'_, '_, '_>) -> Option<LangResult<ObjectRef>>>
Calls this function if the parameters are valid and returns None otherwise
required_parameter_fn: Box<dyn Fn(&TypeContext) -> Option<Vec<Vec<ClassRef>>>>
Returns the parameters that this function wants. If None any parameters are assumed to be valid
Trait Implementations§
source§impl From<NormalizedFunction> for DebrisFunctionInterface
impl From<NormalizedFunction> for DebrisFunctionInterface
source§fn from(value: NormalizedFunction) -> Self
fn from(value: NormalizedFunction) -> Self
Converts to this type from the input type.
source§impl ToFunctionInterface<(), ()> for NormalizedFunction
impl ToFunctionInterface<(), ()> for NormalizedFunction
fn to_normalized_function(self) -> NormalizedFunction
Auto Trait Implementations§
impl !RefUnwindSafe for NormalizedFunction
impl !Send for NormalizedFunction
impl !Sync for NormalizedFunction
impl Unpin for NormalizedFunction
impl !UnwindSafe for NormalizedFunction
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