Trait Filter
pub trait Filter<Arg, Res: FunctionResult>: Sync + Send + 'static
The filter function type definition
Required Methods
fn call(&self, value: Arg, kwargs: Kwargs, state: &State<'_>) -> ResThe filter function type definition
Provided Methods
fn is_safe(&self) -> boolWhether the current filter's output should be treated as safe, defaults to
falseOnly needs to be defined if the filter returns a string
Implementors
impl<Func, Arg, Res> Filter<Arg, Res> for Func where Func: Fn(Arg, Kwargs, &State<'_>) -> Res + Sync + Send + 'static, Arg: for<'a> ArgFromValue<'a>, Res: FunctionResult,