Available on crate feature
filter
only.Expand description
Standard operators from Django for use with filtering.
These have short names, matching their Django names, that can be used in the derive macro for Filterable. There are the following operators:
Operator | OperatorClass | Short name | Restrictions |
---|---|---|---|
ExactImpl | Exact | exact | T: Eq |
InImpl | In | in | T: Eq |
ContainsImpl | Contains | contains | T: Display |
IContainsImpl | IContains | icontains | T: Display |
IExactImpl | IExact | iexact | T: Display |
StartsWithImpl | StartsWith | startswith | T: Display |
EndsWithImpl | EndsWith | endswith | T: Display |
LessImpl | Less | lt | T: Ord |
GreaterImpl | Greater | gt | T: Ord |
LessEqImpl | LessEq | lte | T: Ord |
GreaterEqImpl | GreaterEq | gte | T: Ord |
IsNullImpl | IsNull | isnull |
Structs§
- Contains
- The
OperatorClass
that can instantiateContainsImpl
. - Contains
Impl - Match when the string representation of the value contains the target.
- Ends
With - The
OperatorClass
that can instantiateEndsWithImpl
. - Ends
With Impl - Match when the string representation of the value ends with the target.
- Exact
- The
OperatorClass
that can instantiateExactImpl
. - Exact
Impl - Match when the value is equal to the target.
- Greater
- The
OperatorClass
that can instantiateGreaterImpl
. - Greater
Eq - The
OperatorClass
that can instantiateGreaterEqImpl
. - Greater
EqImpl - Match when the value is greater than or equal to the target.
- Greater
Impl - Match when value is greater than the target.
- IContains
- The
OperatorClass
that can instantiateIContainsImpl
. - IContains
Impl - Match when the string representation of the value contains the target case insensitively.
- IExact
- The
OperatorClass
that can instantiateIExactImpl
. - IExact
Impl - Match when the string representation of the value is exactly the target, case insensitively.
- In
- The
OperatorClass
that can instantiateInImpl
. - InImpl
- Match when the value is equal to one of the targets.
- IsNull
- The
OperatorClass
that can instantiateIsNullImpl
. - IsNull
Impl - Match when there is no value, because a containing
Option
isNone
. - Less
- The
OperatorClass
that can instantiateLessImpl
. - LessEq
- The
OperatorClass
that can instantiateLessEqImpl
. - Less
EqImpl - Match when the value is less than or equal to the target.
- Less
Impl - Match when value is less than the target.
- Starts
With - The
OperatorClass
that can instantiateStartsWithImpl
. - Starts
With Impl - Match when the string representation of the value starts with the target.