Trait liquid_core::FilterParameters
source · [−]pub trait FilterParameters<'a>: Sized + FilterParametersReflection + Debug + Display {
type EvaluatedFilterParameters;
fn from_args(args: FilterArguments<'_>) -> Result<Self>;
fn evaluate(
&'a self,
runtime: &'a dyn Runtime
) -> Result<Self::EvaluatedFilterParameters>;
}Expand description
A trait that declares and holds the parameters of a filter.
Provides from_args, to construct itself from FilterArguments (parses the arguments)
and evaluate, to construct its evaluated counterpart (evaluates the arguments).
Deriving
The whole point of this structure is to facilitate the process of deriving a filter.
Thus, this trait and all traits it requires may be derived with #[derive(Debug, FilterParameters)].
See documentation for FilterParameters macro on liquid-derive for more information.