#[non_exhaustive]pub enum CountBound {
Exact(u64),
AtLeast(u64),
AtMost(u64),
Range(u64, u64),
}Expand description
The recorded-request count bound of a RequestExpectation:
exactly one bound form per expectation. Poll semantics per bound
(arrivals only add, so the filtered count is monotone
non-decreasing):
- Without a deadline, one immediate snapshot decides for every bound.
CountBound::Exactpolls until a snapshot’s count equalsn; a snapshot above never passes.CountBound::AtLeastsucceeds early, once the count reachesn(sound: the count only grows).CountBound::AtMostis an absence claim over the window: it waits the full deadline, fails immediately on any snapshot aboven, and decides on the final snapshot — an early passing snapshot cannot prove the count stays within bounds.CountBound::Rangefails immediately above the maximum and otherwise waits the full deadline, deciding on the final snapshot within[min, max].
These semantics document a monotone subject: arrivals only add, so the filtered count is non-decreasing and a reached count stays reached. SQL row counts are NOT monotone — a DELETE shrinks the row set — so SQL count assertions never settle early; the final snapshot at the deadline decides.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Exact(u64)
Exactly n matching requests.
AtLeast(u64)
At least n matching requests (early success at n or more).
AtMost(u64)
At most n matching requests (absence claim over the window).
Range(u64, u64)
Between min and max matching requests, inclusive.
Trait Implementations§
Source§impl Clone for CountBound
impl Clone for CountBound
Source§fn clone(&self) -> CountBound
fn clone(&self) -> CountBound
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CountBound
impl Debug for CountBound
Source§impl PartialEq for CountBound
impl PartialEq for CountBound
impl StructuralPartialEq for CountBound
Auto Trait Implementations§
impl Freeze for CountBound
impl RefUnwindSafe for CountBound
impl Send for CountBound
impl Sync for CountBound
impl Unpin for CountBound
impl UnsafeUnpin for CountBound
impl UnwindSafe for CountBound
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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 moreSource§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