#[derive(ParseFilter)]
{
// Attributes available to this derive:
#[filter]
}
Expand description
Implements ParseFilter.
This is only useful for stateless filters (the most common case). For filters with configurable state, you will need to implement this trait manually.
Requires the #[filter(...)] attribute to define the filter, with the
following information:
- parameters -> (OPTIONAL) only required if the filter has parameters,
the FilterParameters struct
- parsed -> the Filter struct
§Example
ⓘ
#[derive(Clone, ParseFilter, FilterReflection)]
#[filter(
name = "slice", // Required by `FilterReflection`, not `ParseFilter`
description = "Takes a slice of a given string or array.", // Required by `FilterReflection`, not `ParseFilter`
parameters(SliceArgs), // The filter has parameters
parsed(SliceFilter)
)]
pub struct Slice;