Trait minijinja::value::FunctionArgs[][src]

pub trait FunctionArgs: Sized {
    fn from_values(values: Vec<Value>) -> Result<Self, Error>;
}
Expand description

Helper trait representing valid filter and test arguments.

Since it’s more convenient to write filters and tests with concrete types instead of values, this helper trait exists to automatically perform this conversion. It is implemented for functions up to an arity of 5 parameters.

For each argument the conversion is performed via the ArgType trait which is implemented for some primitive concrete types as well as these types wrapped in Option.

Required methods

Converts to function arguments from a slice of values.

Implementations on Foreign Types

Implementors