#[non_exhaustive]pub enum Condition {
Field {
key: String,
matches: Option<MatchValue>,
range: Option<Range>,
},
HasId {
has_id: Vec<PointId>,
},
Nested(Filter),
}Expand description
A predicate used inside a Filter.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Field
Matches or range-checks a dot-separated payload field.
Fields
§
matches: Option<MatchValue>Optional equality match.
HasId
Matches points whose typed ID is in the supplied set.
Nested(Filter)
Evaluates a nested Boolean filter.
Implementations§
Source§impl Condition
impl Condition
Sourcepub fn matches(key: impl Into<String>, value: impl Into<Value>) -> Self
pub fn matches(key: impl Into<String>, value: impl Into<Value>) -> Self
Creates an equality condition for a dot-separated payload path.
Sourcepub fn range(key: impl Into<String>, range: Range) -> Self
pub fn range(key: impl Into<String>, range: Range) -> Self
Creates a numeric-range condition for a dot-separated payload path.
Sourcepub fn has_id(ids: impl IntoIterator<Item = PointId>) -> Self
pub fn has_id(ids: impl IntoIterator<Item = PointId>) -> Self
Creates a condition that accepts the supplied typed point IDs.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Condition
impl<'de> Deserialize<'de> for Condition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Condition
impl RefUnwindSafe for Condition
impl Send for Condition
impl Sync for Condition
impl Unpin for Condition
impl UnsafeUnpin 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