Struct qdrant_client::qdrant::Condition
source · pub struct Condition {
pub condition_one_of: Option<ConditionOneOf>,
}Fields§
§condition_one_of: Option<ConditionOneOf>Implementations§
source§impl Condition
impl Condition
sourcepub fn is_empty(key: impl Into<String>) -> Self
pub fn is_empty(key: impl Into<String>) -> Self
create a Condition to check if a field is empty
Examples:
qdrant_client::qdrant::Condition::is_empty("field");sourcepub fn is_null(key: impl Into<String>) -> Self
pub fn is_null(key: impl Into<String>) -> Self
create a Condition to check if the point has a null key
Examples:
qdrant_client::qdrant::Condition::is_empty("remark");sourcepub fn has_id(ids: impl IntoIterator<Item = impl Into<PointId>>) -> Self
pub fn has_id(ids: impl IntoIterator<Item = impl Into<PointId>>) -> Self
create a Condition to check if the point has one of the given ids
Examples:
qdrant_client::qdrant::Condition::has_id([0, 8, 15]);sourcepub fn matches(field: impl Into<String>, match: impl Into<MatchValue>) -> Self
pub fn matches(field: impl Into<String>, match: impl Into<MatchValue>) -> Self
create a Condition that matches a field against a certain value
Examples:
qdrant_client::qdrant::Condition::matches("number", 42);
qdrant_client::qdrant::Condition::matches("tag", vec!["i".to_string(), "em".into()]);sourcepub fn range(field: impl Into<String>, range: Range) -> Self
pub fn range(field: impl Into<String>, range: Range) -> Self
create a Condition that checks numeric fields against a range
Examples:
use qdrant_client::qdrant::Range;
qdrant_client::qdrant::Condition::range("number", Range {
gte: Some(42.),
..Default::default()
});sourcepub fn geo_radius(field: impl Into<String>, geo_radius: GeoRadius) -> Self
pub fn geo_radius(field: impl Into<String>, geo_radius: GeoRadius) -> Self
create a Condition that checks geo fields against a radius
Examples:
use qdrant_client::qdrant::{GeoPoint, GeoRadius};
qdrant_client::qdrant::Condition::geo_radius("location", GeoRadius {
center: Some(GeoPoint { lon: 42., lat: 42. }),
radius: 42.,
});sourcepub fn geo_bounding_box(
field: impl Into<String>,
geo_bounding_box: GeoBoundingBox
) -> Self
pub fn geo_bounding_box( field: impl Into<String>, geo_bounding_box: GeoBoundingBox ) -> Self
create a Condition that checks geo fields against a bounding box
Examples:
use qdrant_client::qdrant::{GeoPoint, GeoBoundingBox};
qdrant_client::qdrant::Condition::geo_bounding_box("location", GeoBoundingBox {
top_left: Some(GeoPoint { lon: 42., lat: 42. }),
bottom_right: Some(GeoPoint { lon: 42., lat: 42. }),
});sourcepub fn values_count(field: impl Into<String>, values_count: ValuesCount) -> Self
pub fn values_count(field: impl Into<String>, values_count: ValuesCount) -> Self
create a Condition that checks count of values in a field
Examples:
use qdrant_client::qdrant::ValuesCount;
qdrant_client::qdrant::Condition::values_count("tags", ValuesCount {
gte: Some(42),
..Default::default()
});Trait Implementations§
source§impl From<FieldCondition> for Condition
impl From<FieldCondition> for Condition
source§fn from(field_condition: FieldCondition) -> Self
fn from(field_condition: FieldCondition) -> Self
Converts to this type from the input type.
source§impl From<HasIdCondition> for Condition
impl From<HasIdCondition> for Condition
source§fn from(has_id_condition: HasIdCondition) -> Self
fn from(has_id_condition: HasIdCondition) -> Self
Converts to this type from the input type.
source§impl From<IsEmptyCondition> for Condition
impl From<IsEmptyCondition> for Condition
source§fn from(is_empty_condition: IsEmptyCondition) -> Self
fn from(is_empty_condition: IsEmptyCondition) -> Self
Converts to this type from the input type.
source§impl From<IsNullCondition> for Condition
impl From<IsNullCondition> for Condition
source§fn from(is_null_condition: IsNullCondition) -> Self
fn from(is_null_condition: IsNullCondition) -> Self
Converts to this type from the input type.
source§impl Message for Condition
impl Message for Condition
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
Encodes the message to a buffer. Read more
source§fn encode_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8, Global>where Self: Sized,
Encodes the message to a newly allocated buffer.
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>where Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
Decodes a length-delimited instance of the message from the buffer.
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.source§impl PartialEq<Condition> for Condition
impl PartialEq<Condition> for Condition
impl StructuralPartialEq for Condition
Auto Trait Implementations§
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request