Trait tera::Filter

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

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

The filter function type definition

Required Methods§

source

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

The filter function type definition

Provided Methods§

source

fn is_safe(&self) -> bool

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

Implementors§

source§

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