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
OperatorClassthat can instantiateContainsImpl. - Contains
Impl - Match when the string representation of the value contains the target.
- Ends
With - The
OperatorClassthat can instantiateEndsWithImpl. - Ends
With Impl - Match when the string representation of the value ends with the target.
- Exact
- The
OperatorClassthat can instantiateExactImpl. - Exact
Impl - Match when the value is equal to the target.
- Greater
- The
OperatorClassthat can instantiateGreaterImpl. - Greater
Eq - The
OperatorClassthat 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
OperatorClassthat can instantiateIContainsImpl. - IContains
Impl - Match when the string representation of the value contains the target case insensitively.
- IExact
- The
OperatorClassthat can instantiateIExactImpl. - IExact
Impl - Match when the string representation of the value is exactly the target, case insensitively.
- In
- The
OperatorClassthat can instantiateInImpl. - InImpl
- Match when the value is equal to one of the targets.
- IsNull
- The
OperatorClassthat can instantiateIsNullImpl. - IsNull
Impl - Match when there is no value, because a containing
OptionisNone. - Less
- The
OperatorClassthat can instantiateLessImpl. - LessEq
- The
OperatorClassthat 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
OperatorClassthat can instantiateStartsWithImpl. - Starts
With Impl - Match when the string representation of the value starts with the target.