pub trait Member<'a, R>: Clone + 'a {
type Value: Operable;
// Required methods
fn apply<O: Operator<<Self::Value as Operable>::Base>>(
&self,
op: &O,
data: &R,
) -> bool;
fn accept_visitor<V: MemberVisitor<'a, Self, R, Self::Value>>(
&self,
visitor: &mut V,
);
}Available on crate feature
filter only.Expand description
A wrapper for a field of Operable type.
A Member is a filterable field of a structure. You will
normally generate implementations of Member using the
Filterable derive macro for your type. Whereas a Field
provides access for nesting, a Member is visible to queries,
and will expose a list of supported operators to a
MemberVisitor.
Required Associated Types§
Required Methods§
Sourcefn apply<O: Operator<<Self::Value as Operable>::Base>>(
&self,
op: &O,
data: &R,
) -> bool
fn apply<O: Operator<<Self::Value as Operable>::Base>>( &self, op: &O, data: &R, ) -> bool
Apply an operator to the given field of data, returning the
result.
Sourcefn accept_visitor<V: MemberVisitor<'a, Self, R, Self::Value>>(
&self,
visitor: &mut V,
)
fn accept_visitor<V: MemberVisitor<'a, Self, R, Self::Value>>( &self, visitor: &mut V, )
visitor will be called with each of the supported operator
classes for this member. This is used to build up a list
of supported queries in an OperatorSet.
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.