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:
arc_vector_rust::arc_vector::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:
arc_vector_rust::arc_vector::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:
arc_vector_rust::arc_vector::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:
arc_vector_rust::arc_vector::Condition::matches("number", 42);
arc_vector_rust::arc_vector::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 arc_vector_rust::arc_vector::Range;
arc_vector_rust::arc_vector::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 arc_vector_rust::arc_vector::{GeoPoint, GeoRadius};
arc_vector_rust::arc_vector::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 arc_vector_rust::arc_vector::{GeoPoint, GeoBoundingBox};
arc_vector_rust::arc_vector::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 arc_vector_rust::arc_vector::ValuesCount;
arc_vector_rust::arc_vector::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>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
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>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
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