pub enum AggregateFilter {
In {
values: RawValue,
},
Prefix {
prefix: String,
},
Range {
gte: Option<RawValue>,
gt: Option<RawValue>,
lte: Option<RawValue>,
lt: Option<RawValue>,
},
And(Vec<AggregateFilter>),
Or(Vec<AggregateFilter>),
Not(Box<AggregateFilter>),
}Expand description
Filter for aggregating values.
Variants§
In
Require the value to be in the list of values
Prefix
Require the value to be text and start with prefix.
Range
Require the value to be greater than gt, greater than or equal to gte,
less than lt and less than or equal to lte
Fields
And(Vec<AggregateFilter>)
Require all these filters to match
Or(Vec<AggregateFilter>)
Require at least one of these filters to match.
Not(Box<AggregateFilter>)
Require this filter not to match.
Implementations§
Source§impl AggregateFilter
impl AggregateFilter
Sourcepub fn range(
gte: Option<impl Into<RawValue>>,
gt: Option<impl Into<RawValue>>,
lte: Option<impl Into<RawValue>>,
lt: Option<impl Into<RawValue>>,
) -> Self
pub fn range( gte: Option<impl Into<RawValue>>, gt: Option<impl Into<RawValue>>, lte: Option<impl Into<RawValue>>, lt: Option<impl Into<RawValue>>, ) -> Self
Construct a range filter.
§Arguments
gte- Greater than or equal to.gt- Greater than.lte- Less than or equal to.lt- Less than.
Sourcepub fn not(filter: AggregateFilter) -> Self
pub fn not(filter: AggregateFilter) -> Self
Sourcepub fn and(self, filter: AggregateFilter) -> Self
pub fn and(self, filter: AggregateFilter) -> Self
Construct an and filter from this filter and another filter.
§Arguments
filter- AND with this filter.
Sourcepub fn or(self, filter: AggregateFilter) -> Self
pub fn or(self, filter: AggregateFilter) -> Self
Construct an or filter from this filter and another filter.
§Arguments
filter- OR with this filter.
Trait Implementations§
Source§impl Clone for AggregateFilter
impl Clone for AggregateFilter
Source§fn clone(&self) -> AggregateFilter
fn clone(&self) -> AggregateFilter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AggregateFilter
impl Debug for AggregateFilter
Source§impl<'de> Deserialize<'de> for AggregateFilter
impl<'de> Deserialize<'de> for AggregateFilter
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 AggregateFilter
impl RefUnwindSafe for AggregateFilter
impl Send for AggregateFilter
impl Sync for AggregateFilter
impl Unpin for AggregateFilter
impl UnwindSafe for AggregateFilter
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