pub struct Filter { /* private fields */ }Expand description
Metadata filter builder
Implementations§
Source§impl Filter
impl Filter
Sourcepub fn eq<K: Into<String>, V: Into<FilterValue>>(self, key: K, value: V) -> Self
pub fn eq<K: Into<String>, V: Into<FilterValue>>(self, key: K, value: V) -> Self
Add equality condition
Sourcepub fn ne<K: Into<String>, V: Into<FilterValue>>(self, key: K, value: V) -> Self
pub fn ne<K: Into<String>, V: Into<FilterValue>>(self, key: K, value: V) -> Self
Add not-equal condition
Sourcepub fn gt<K: Into<String>, V: Into<FilterValue>>(self, key: K, value: V) -> Self
pub fn gt<K: Into<String>, V: Into<FilterValue>>(self, key: K, value: V) -> Self
Add greater-than condition
Sourcepub fn gte<K: Into<String>, V: Into<FilterValue>>(
self,
key: K,
value: V,
) -> Self
pub fn gte<K: Into<String>, V: Into<FilterValue>>( self, key: K, value: V, ) -> Self
Add greater-than-or-equal condition
Sourcepub fn lt<K: Into<String>, V: Into<FilterValue>>(self, key: K, value: V) -> Self
pub fn lt<K: Into<String>, V: Into<FilterValue>>(self, key: K, value: V) -> Self
Add less-than condition
Sourcepub fn lte<K: Into<String>, V: Into<FilterValue>>(
self,
key: K,
value: V,
) -> Self
pub fn lte<K: Into<String>, V: Into<FilterValue>>( self, key: K, value: V, ) -> Self
Add less-than-or-equal condition
Sourcepub fn in_list<K: Into<String>, V: Into<FilterValue>>(
self,
key: K,
values: V,
) -> Self
pub fn in_list<K: Into<String>, V: Into<FilterValue>>( self, key: K, values: V, ) -> Self
Add IN condition (value must be in list)
Sourcepub fn not_in<K: Into<String>, V: Into<FilterValue>>(
self,
key: K,
values: V,
) -> Self
pub fn not_in<K: Into<String>, V: Into<FilterValue>>( self, key: K, values: V, ) -> Self
Add NOT IN condition (value must not be in list)
Sourcepub fn contains<K: Into<String>, V: Into<String>>(
self,
key: K,
substring: V,
) -> Self
pub fn contains<K: Into<String>, V: Into<String>>( self, key: K, substring: V, ) -> Self
Add contains condition (string contains substring)
Sourcepub fn starts_with<K: Into<String>, V: Into<String>>(
self,
key: K,
prefix: V,
) -> Self
pub fn starts_with<K: Into<String>, V: Into<String>>( self, key: K, prefix: V, ) -> Self
Add starts_with condition
Sourcepub fn conditions(&self) -> &[FilterCondition]
pub fn conditions(&self) -> &[FilterCondition]
Get the conditions
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Filter
impl<'de> Deserialize<'de> for Filter
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 Filter
impl RefUnwindSafe for Filter
impl Send for Filter
impl Sync for Filter
impl Unpin for Filter
impl UnwindSafe for Filter
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more