Struct mage::Function []

pub struct Function {
    pub max_args: Option<usize>,
    pub min_args: Option<usize>,
    pub compiled: Box<Fn(Vec<Value>) + 'static + Send + Sync>,
}

Custom function

Fields

Maximum number of arguments.

Minimum number of arguments.

Accept values and return a result which contains a value.

Methods

impl Function

Create a function with a closure.

Trait Implementations

impl Debug for Function

Formats the value using the given formatter.