pub enum Filter {
Equals(String, Value),
GreaterThan(String, Value),
LessThan(String, Value),
GreaterOrEqual(String, Value),
LessOrEqual(String, Value),
Contains(String, String),
StartsWith(String, String),
EndsWith(String, String),
In(String, Vec<Value>),
Exists(String, bool),
And(Box<Self>, Box<Self>),
Or(Box<Self>, Box<Self>),
}Expand description
A filter condition for querying documents.
Variants§
Equals(String, Value)
Equality filter: field == value
GreaterThan(String, Value)
Greater than filter: field > value
LessThan(String, Value)
Less than filter: field < value
GreaterOrEqual(String, Value)
Greater or equal filter: field >= value
LessOrEqual(String, Value)
Less or equal filter: field <= value
Contains(String, String)
Contains filter: field contains substring (for strings)
StartsWith(String, String)
Starts with filter: field starts with prefix (for strings)
EndsWith(String, String)
Ends with filter: field ends with suffix (for strings)
In(String, Vec<Value>)
In filter: field value is in the provided list
Exists(String, bool)
Exists filter: field exists (or doesn’t exist if false)
And(Box<Self>, Box<Self>)
Logical AND of two filters
Or(Box<Self>, Box<Self>)
Logical OR of two filters
Trait Implementations§
impl Eq for Filter
impl StructuralPartialEq for Filter
Auto Trait Implementations§
impl Freeze for Filter
impl RefUnwindSafe for Filter
impl Send for Filter
impl Sync for Filter
impl Unpin for Filter
impl UnwindSafe for Filter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more