pub trait MetadataFilter<IF, NF, KF, LF, WF, AF, N, K, L, W, WV, A, AV>where
IF: FieldsFilter<Uuid>,
NF: FieldsFilter<N>,
KF: FieldsFilter<K>,
LF: FieldsFilter<L>,
WF: FieldValuesFilter<W, WV>,
AF: FieldValuesFilter<A, AV>,
N: Field,
K: Field,
L: Field,
W: Field,
WV: WeightValue,
A: Field,
AV: AnnotationValue,{
// Required methods
fn id_filters<'a>(&'a self) -> impl Iterator<Item = &'a IF>
where IF: 'a;
fn name_filters<'a>(&'a self) -> impl Iterator<Item = &'a NF>
where NF: 'a;
fn kind_filters<'a>(&'a self) -> impl Iterator<Item = &'a KF>
where KF: 'a;
fn label_filters<'a>(&'a self) -> impl Iterator<Item = &'a LF>
where LF: 'a;
fn weight_filters<'a>(&'a self) -> impl Iterator<Item = &'a WF>
where WF: 'a;
fn annotation_filters<'a>(&'a self) -> impl Iterator<Item = &'a AF>
where AF: 'a;
// Provided method
fn matches_metadata<'a, M: ReadMetadata<'a, N, K, L, W, WV, A, AV>>(
&'a self,
meta: &'a M,
) -> bool
where N: 'a,
K: 'a,
L: 'a,
W: 'a,
WV: 'a,
A: 'a,
AV: 'a,
LF: 'a,
WF: 'a,
AF: 'a { ... }
}Expand description
Filtering behavior that checks filtering for entire metadata instances.
Required Methods§
Sourcefn id_filters<'a>(&'a self) -> impl Iterator<Item = &'a IF>where
IF: 'a,
fn id_filters<'a>(&'a self) -> impl Iterator<Item = &'a IF>where
IF: 'a,
Filters by ID.
Sourcefn name_filters<'a>(&'a self) -> impl Iterator<Item = &'a NF>where
NF: 'a,
fn name_filters<'a>(&'a self) -> impl Iterator<Item = &'a NF>where
NF: 'a,
Filters by name.
Sourcefn kind_filters<'a>(&'a self) -> impl Iterator<Item = &'a KF>where
KF: 'a,
fn kind_filters<'a>(&'a self) -> impl Iterator<Item = &'a KF>where
KF: 'a,
Filters by kind.
Sourcefn label_filters<'a>(&'a self) -> impl Iterator<Item = &'a LF>where
LF: 'a,
fn label_filters<'a>(&'a self) -> impl Iterator<Item = &'a LF>where
LF: 'a,
Filters by label.
Sourcefn weight_filters<'a>(&'a self) -> impl Iterator<Item = &'a WF>where
WF: 'a,
fn weight_filters<'a>(&'a self) -> impl Iterator<Item = &'a WF>where
WF: 'a,
Filters by weight.
Sourcefn annotation_filters<'a>(&'a self) -> impl Iterator<Item = &'a AF>where
AF: 'a,
fn annotation_filters<'a>(&'a self) -> impl Iterator<Item = &'a AF>where
AF: 'a,
Filters by annotation.
Provided Methods§
Sourcefn matches_metadata<'a, M: ReadMetadata<'a, N, K, L, W, WV, A, AV>>(
&'a self,
meta: &'a M,
) -> boolwhere
N: 'a,
K: 'a,
L: 'a,
W: 'a,
WV: 'a,
A: 'a,
AV: 'a,
LF: 'a,
WF: 'a,
AF: 'a,
fn matches_metadata<'a, M: ReadMetadata<'a, N, K, L, W, WV, A, AV>>(
&'a self,
meta: &'a M,
) -> boolwhere
N: 'a,
K: 'a,
L: 'a,
W: 'a,
WV: 'a,
A: 'a,
AV: 'a,
LF: 'a,
WF: 'a,
AF: 'a,
Return whether this metadata filter matches the given metadata.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.