pub struct Function {
pub max_args: Option<usize>,
pub min_args: Option<usize>,
pub compiled: Box<dyn Fn(Vec<Value>) -> Result<Value, Error> + Send + Sync>,
}
Expand description
Custom function
Fields§
§max_args: Option<usize>
Maximum number of arguments.
min_args: Option<usize>
Minimum number of arguments.
compiled: Box<dyn Fn(Vec<Value>) -> Result<Value, Error> + Send + Sync>
Accept values and return a result which contains a value.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Function
impl !RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl !UnwindSafe for Function
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