pub struct Condition {
pub condition_one_of: Option<ConditionOneOf>,
}
Fields§
§condition_one_of: Option<ConditionOneOf>
Implementations§
source§impl Condition
impl Condition
sourcepub fn has_id(ids: impl IntoIterator<Item = impl Into<PointId>>) -> Self
pub fn has_id(ids: impl IntoIterator<Item = impl Into<PointId>>) -> Self
sourcepub fn datetime_range(field: impl Into<String>, range: DatetimeRange) -> Self
pub fn datetime_range(field: impl Into<String>, range: DatetimeRange) -> Self
sourcepub fn geo_radius(field: impl Into<String>, geo_radius: GeoRadius) -> Self
pub fn geo_radius(field: impl Into<String>, geo_radius: GeoRadius) -> Self
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 geo_polygon(field: impl Into<String>, geo_polygon: GeoPolygon) -> Self
pub fn geo_polygon(field: impl Into<String>, geo_polygon: GeoPolygon) -> Self
Create a Condition
that checks geo fields against a geo polygons.
§Examples:
use qdrant_client::qdrant::{GeoLineString, GeoPoint, GeoPolygon};
let polygon = GeoPolygon {
exterior: Some(GeoLineString { points: vec![GeoPoint { lon: 42., lat: 42. }]}),
interiors: vec![],
};
qdrant_client::qdrant::Condition::geo_polygon("location", polygon);
sourcepub fn values_count(field: impl Into<String>, values_count: ValuesCount) -> Self
pub fn values_count(field: impl Into<String>, values_count: ValuesCount) -> Self
sourcepub fn nested(field: impl Into<String>, filter: Filter) -> Self
pub fn nested(field: impl Into<String>, filter: Filter) -> Self
Create a Condition
that applies a per-element filter to a nested array
The field
parameter should be a key-path to a nested array of objects.
You may specify it as both array_field
or array_field[]
.
For motivation and further examples, see API documentation.
§Panics:
If debug assertions are enabled, this will panic if the filter, or any its subfilters,
contain a HasIdCondition
(equivalently, a condition created with Self::has_id
),
as these are unsupported for nested object filters.
§Examples:
use qdrant_client::qdrant::Filter;
qdrant_client::qdrant::Condition::nested("array_field[]", Filter::any([
qdrant_client::qdrant::Condition::is_null("element_field")
]));
Trait Implementations§
source§impl From<ConditionOneOf> for Condition
impl From<ConditionOneOf> for Condition
source§fn from(value: ConditionOneOf) -> Self
fn from(value: ConditionOneOf) -> Self
Converts to this type from the input type.
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 From<NestedCondition> for Condition
impl From<NestedCondition> for Condition
source§fn from(nested_condition: NestedCondition) -> Self
fn from(nested_condition: NestedCondition) -> 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(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message to a newly allocated buffer.
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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