[−][src]Derive Macro liquid_derive::Display_filter
#[derive(Display_filter)] { // Attributes available to this derive: #[name] #[parameters] }
Implements Display
for a structure that intends to implement the Filter
trait.
Requires the helper attribute #[name = "..."]
to tell the name of the
filter before its declaration.
If the filter has parameters, the field that holds them must be marked
with #[parameters]
.
Example
ⓘThis example is not tested
#[derive(Debug, FromFilterParameters, Display_filter)] #[name = "at_least"] // The name of the filter struct AtLeastFilter { #[parameters] // Mark the FilterParameters struct args: AtLeastArgs, // A struct that implements `FilterParameters` } impl Filter for AtLeastFilter { // ... }