pub struct CardinalityLimits<'a, T> { /* private fields */ }
Expand description
Result of CardinalityLimiter::check_cardinality_limits
.
Implementations§
Source§impl<'a, T> CardinalityLimits<'a, T>
impl<'a, T> CardinalityLimits<'a, T>
Sourcepub fn has_rejections(&self) -> bool
pub fn has_rejections(&self) -> bool
Returns true
if any items have been rejected.
Sourcepub fn exceeded_limits(&self) -> &HashSet<&'a CardinalityLimit>
pub fn exceeded_limits(&self) -> &HashSet<&'a CardinalityLimit>
Returns all id’s of cardinality limits which were exceeded.
This includes passive limits.
Sourcepub fn cardinality_reports(
&self,
) -> &BTreeMap<&'a CardinalityLimit, Vec<CardinalityReport>>
pub fn cardinality_reports( &self, ) -> &BTreeMap<&'a CardinalityLimit, Vec<CardinalityReport>>
Returns all cardinality reports grouped by the cardinality limit.
Cardinality reports are generated for all cardinality limits with reporting enabled and the current cardinality changed.
Sourcepub fn into_source(self) -> Vec<T>
pub fn into_source(self) -> Vec<T>
Recovers the original list of items passed to the cardinality limiter.
Sourcepub fn rejected(&self) -> impl Iterator<Item = &T>
pub fn rejected(&self) -> impl Iterator<Item = &T>
Returns an iterator yielding only rejected items.
Sourcepub fn into_split(self) -> CardinalityLimitsSplit<'a, T>
pub fn into_split(self) -> CardinalityLimitsSplit<'a, T>
Consumes the result and returns CardinalityLimitsSplit
containing all accepted and rejected items.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for CardinalityLimits<'a, T>
impl<'a, T> RefUnwindSafe for CardinalityLimits<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for CardinalityLimits<'a, T>where
T: Send,
impl<'a, T> Sync for CardinalityLimits<'a, T>where
T: Sync,
impl<'a, T> Unpin for CardinalityLimits<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for CardinalityLimits<'a, T>where
T: UnwindSafe,
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
§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>
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