pub struct SubscriptionFilter(FilterExpression);Expand description
A validated server-side publication tag filter.
Tuple Fields§
§0: FilterExpressionImplementations§
Source§impl SubscriptionFilter
impl SubscriptionFilter
Sourcepub fn equal(
key: impl Into<String>,
value: FilterValue,
) -> Result<Self, FilterError>
pub fn equal( key: impl Into<String>, value: FilterValue, ) -> Result<Self, FilterError>
Matches tags whose value equals value.
§Errors
Returns an error if the key or required value is empty.
Sourcepub fn not_equal(
key: impl Into<String>,
value: FilterValue,
) -> Result<Self, FilterError>
pub fn not_equal( key: impl Into<String>, value: FilterValue, ) -> Result<Self, FilterError>
Matches tags whose value does not equal value.
§Errors
Returns an error if the key or required value is empty.
Sourcepub fn is_in<I>(key: impl Into<String>, values: I) -> Result<Self, FilterError>where
I: IntoIterator<Item = FilterValue>,
pub fn is_in<I>(key: impl Into<String>, values: I) -> Result<Self, FilterError>where
I: IntoIterator<Item = FilterValue>,
Matches tags whose value is present in values.
§Errors
Returns an error if the key or value list is empty.
Sourcepub fn is_not_in<I>(
key: impl Into<String>,
values: I,
) -> Result<Self, FilterError>where
I: IntoIterator<Item = FilterValue>,
pub fn is_not_in<I>(
key: impl Into<String>,
values: I,
) -> Result<Self, FilterError>where
I: IntoIterator<Item = FilterValue>,
Matches tags whose value is absent from values.
§Errors
Returns an error if the key or value list is empty.
Sourcepub fn not_exists(key: impl Into<String>) -> Result<Self, FilterError>
pub fn not_exists(key: impl Into<String>) -> Result<Self, FilterError>
Sourcepub fn starts_with(
key: impl Into<String>,
value: FilterValue,
) -> Result<Self, FilterError>
pub fn starts_with( key: impl Into<String>, value: FilterValue, ) -> Result<Self, FilterError>
Matches text tags beginning with value.
§Errors
Returns an error if the key is empty or the value is not non-empty text.
Sourcepub fn ends_with(
key: impl Into<String>,
value: FilterValue,
) -> Result<Self, FilterError>
pub fn ends_with( key: impl Into<String>, value: FilterValue, ) -> Result<Self, FilterError>
Matches text tags ending with value.
§Errors
Returns an error if the key is empty or the value is not non-empty text.
Sourcepub fn contains(
key: impl Into<String>,
value: FilterValue,
) -> Result<Self, FilterError>
pub fn contains( key: impl Into<String>, value: FilterValue, ) -> Result<Self, FilterError>
Matches text tags containing value.
§Errors
Returns an error if the key is empty or the value is not non-empty text.
Sourcepub fn greater_than(
key: impl Into<String>,
value: FilterValue,
) -> Result<Self, FilterError>
pub fn greater_than( key: impl Into<String>, value: FilterValue, ) -> Result<Self, FilterError>
Matches numeric tags greater than value.
§Errors
Returns an error if the key is empty or the value is not numeric.
Sourcepub fn greater_than_or_equal(
key: impl Into<String>,
value: FilterValue,
) -> Result<Self, FilterError>
pub fn greater_than_or_equal( key: impl Into<String>, value: FilterValue, ) -> Result<Self, FilterError>
Matches numeric tags greater than or equal to value.
§Errors
Returns an error if the key is empty or the value is not numeric.
Sourcepub fn less_than(
key: impl Into<String>,
value: FilterValue,
) -> Result<Self, FilterError>
pub fn less_than( key: impl Into<String>, value: FilterValue, ) -> Result<Self, FilterError>
Matches numeric tags less than value.
§Errors
Returns an error if the key is empty or the value is not numeric.
Sourcepub fn less_than_or_equal(
key: impl Into<String>,
value: FilterValue,
) -> Result<Self, FilterError>
pub fn less_than_or_equal( key: impl Into<String>, value: FilterValue, ) -> Result<Self, FilterError>
Matches numeric tags less than or equal to value.
§Errors
Returns an error if the key is empty or the value is not numeric.
Sourcepub fn and<I>(filters: I) -> Result<Self, FilterError>where
I: IntoIterator<Item = Self>,
pub fn and<I>(filters: I) -> Result<Self, FilterError>where
I: IntoIterator<Item = Self>,
Requires every child expression to match.
§Errors
Returns an error if no child expressions are provided.
Sourcepub fn or<I>(filters: I) -> Result<Self, FilterError>where
I: IntoIterator<Item = Self>,
pub fn or<I>(filters: I) -> Result<Self, FilterError>where
I: IntoIterator<Item = Self>,
Requires at least one child expression to match.
§Errors
Returns an error if no child expressions are provided.
fn comparison( key: impl Into<String>, comparison: Comparison, ) -> Result<Self, FilterError>
fn value_comparison( key: impl Into<String>, value: FilterValue, comparison: &'static str, required_kind: Option<&'static str>, constructor: impl FnOnce(FilterValue) -> Comparison, ) -> Result<Self, FilterError>
fn list_comparison<I>(
key: impl Into<String>,
values: I,
comparison: &'static str,
constructor: impl FnOnce(Vec<FilterValue>) -> Comparison,
) -> Result<Self, FilterError>where
I: IntoIterator<Item = FilterValue>,
fn group<I>(
filters: I,
operator: &'static str,
constructor: impl FnOnce(Vec<Self>) -> FilterExpression,
) -> Result<Self, FilterError>where
I: IntoIterator<Item = Self>,
fn precedence(&self) -> u8
fn fmt_with_precedence( &self, formatter: &mut Formatter<'_>, parent_precedence: u8, ) -> Result
Trait Implementations§
Source§impl Clone for SubscriptionFilter
impl Clone for SubscriptionFilter
Source§fn clone(&self) -> SubscriptionFilter
fn clone(&self) -> SubscriptionFilter
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SubscriptionFilter
impl Debug for SubscriptionFilter
Source§impl Display for SubscriptionFilter
impl Display for SubscriptionFilter
Source§impl From<&SubscriptionFilter> for FilterNode
impl From<&SubscriptionFilter> for FilterNode
Source§fn from(filter: &SubscriptionFilter) -> Self
fn from(filter: &SubscriptionFilter) -> Self
Source§impl PartialEq for SubscriptionFilter
impl PartialEq for SubscriptionFilter
impl Eq for SubscriptionFilter
impl StructuralPartialEq for SubscriptionFilter
Auto Trait Implementations§
impl Freeze for SubscriptionFilter
impl RefUnwindSafe for SubscriptionFilter
impl Send for SubscriptionFilter
impl Sync for SubscriptionFilter
impl Unpin for SubscriptionFilter
impl UnsafeUnpin for SubscriptionFilter
impl UnwindSafe for SubscriptionFilter
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> SpecConfig for T
impl<T> SpecConfig for T
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString]. Read more§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.