Skip to main content

ExpressionFunction

Trait ExpressionFunction 

Source
pub trait ExpressionFunction: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn arity(&self) -> usize;
    fn is_variadic(&self) -> bool;
    fn execute(&self, args: &[Value]) -> Result<Value, ExpressionError>;
    fn description(&self) -> &str;
}
Expand description

Expression function characteristics

Required Methods§

Source

fn name(&self) -> &str

Obtain the function name

Source

fn arity(&self) -> usize

Determine the number of parameters

Source

fn is_variadic(&self) -> bool

Check whether variable parameters are accepted.

Source

fn execute(&self, args: &[Value]) -> Result<Value, ExpressionError>

Execute the function

Source

fn description(&self) -> &str

Obtain the function description

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§