pub trait Member<R>: Clone {
    type Value: Operable;
    fn apply<O: Operator<<Self::Value as Operable>::Base>>(
        &self,
        op: &O,
        data: &R
    ) -> bool; fn accept_visitor<V: MemberVisitor<Self, R, Self::Value>>(
        &self,
        visitor: &mut V
    ); }
Expand description

A wrapper for one field of another type, which has Operable type.

A Member is an exposed field of a structure. You will normally generate implementations of Member using the Filterable derive macro for your type. Whereas a Field is just about access for mechanical reasons (nesting), a Member is visible in queries, and can expose a list of supported query operators to a MemberVisitor.

Associated Types

The type of the member’s data, which must be Operable so that Django filtering queries (which are defined on simple types) can be made against it.

Required methods

Apply an operator to the given field of data, returning the result.

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 a OperatorSet.

Implementors