pub struct Condition {
pub key: String,
pub operation: Operation,
}Expand description
A condition which is part of a Query.
Fields§
§key: StringThe key this condition applies to.
operation: OperationThe operation to apply to the key or its value, depending on the type of operation.
Implementations§
Source§impl Condition
impl Condition
Sourcepub fn new(key: String, operation: Operation) -> Self
pub fn new(key: String, operation: Operation) -> Self
Create a new condition that applies the given operation to the key
Sourcepub fn eq(key: String, op: Operand) -> Self
pub fn eq(key: String, op: Operand) -> Self
Check if the value for the key is equal to this operand
Sourcepub fn lt(key: String, op: Operand) -> Self
pub fn lt(key: String, op: Operand) -> Self
Check if the value for the key is less than this operand
Sourcepub fn lte(key: String, op: Operand) -> Self
pub fn lte(key: String, op: Operand) -> Self
Check if the value for the key is less than or equal to this operand
Sourcepub fn gt(key: String, op: Operand) -> Self
pub fn gt(key: String, op: Operand) -> Self
Check if the value for the key is greater than this operand
Sourcepub fn gte(key: String, op: Operand) -> Self
pub fn gte(key: String, op: Operand) -> Self
Check if the value for the key is greater than or equal to this operand
Trait Implementations§
impl StructuralPartialEq for Condition
Auto Trait Implementations§
impl Freeze for Condition
impl RefUnwindSafe for Condition
impl Send for Condition
impl Sync for Condition
impl Unpin for Condition
impl UnwindSafe for Condition
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