#[derive(FilterReflection)]
{
// Attributes available to this derive:
#[filter]
}
Expand description
Implements FilterReflection for a structure that intends to implement
the ParseFilter trait.
Requires the #[filter(...)] attribute to define the filter, with the
following information:
- name -> the name of the filter
- description -> the description of the filter
- parameters -> (OPTIONAL) only required if the filter has parameters,
the FilterParameters struct
§Example
ⓘ
#[derive(Clone, ParseFilter, FilterReflection)]
#[filter(
name = "slice",
description = "Takes a slice of a given string or array.",
parameters(SliceArgs), // The filter has parameters
parsed(SliceFilter) // Required by `ParseFilter`, not `FilterReflection`
)]
pub struct Slice;