Skip to main content

FunctionImpl

Type Alias FunctionImpl 

Source
pub type FunctionImpl = Arc<dyn Fn(&mut dyn EvalContext, &[ExprValue]) -> Result<ExprValue, ExpressionError> + Send + Sync>;
Expand description

Type alias for a boxed function implementation.

Uses Arc<dyn Fn> rather than a bare fn pointer so that closures (capturing environment) can be registered alongside plain functions. Arc (not Box) keeps FunctionLibrary Clone.

Aliased Type§

pub struct FunctionImpl { /* private fields */ }