Struct eval::Function
[−]
[src]
pub struct Function { pub max_args: Option<usize>, pub min_args: Option<usize>, pub compiled: Box<Fn(Vec<Value>) -> Result<Value, Error> + Sync + Send>, }
Custom function
Fields
max_args: Option<usize>
Maximum number of arguments.
min_args: Option<usize>
Minimum number of arguments.
compiled: Box<Fn(Vec<Value>) -> Result<Value, Error> + Sync + Send>
Accept values and return a result which contains a value.
Methods
impl Function
[src]
fn new<F>(closure: F) -> Function where
F: 'static + Fn(Vec<Value>) -> Result<Value, Error> + Sync + Send,
F: 'static + Fn(Vec<Value>) -> Result<Value, Error> + Sync + Send,
Create a function with a closure.