Trait tera::Function

source ·
pub trait Function: Sync + Send {
    // Required method
    fn call(&self, args: &HashMap<String, Value>) -> Result<Value>;

    // Provided method
    fn is_safe(&self) -> bool { ... }
}
Expand description

The global function type definition

Required Methods§

source

fn call(&self, args: &HashMap<String, Value>) -> Result<Value>

The global function type definition

Provided Methods§

source

fn is_safe(&self) -> bool

Whether the current function’s output should be treated as safe, defaults to false

Implementors§

source§

impl<F> Function for Fwhere F: Fn(&HashMap<String, Value>) -> Result<Value> + Sync + Send,