pub struct CallEvents { /* private fields */ }Expand description
A call’s event stream: one receiver, bounded, owned by whoever calls
Call::events first.
There is exactly one consumer by construction (vision principle 3 — own it, don’t share it):
Call::events hands this out once and returns None on every call after, rather than a
value anyone could clone a second reader from.
Implementations§
Source§impl CallEvents
impl CallEvents
Sourcepub fn dropped(&self) -> u64
pub fn dropped(&self) -> u64
How many of this call’s events were dropped because this consumer was behind (§12.1).
Per call, and reported to the consumer that lost them, rather than folded into an
endpoint-wide total. The overflow policy above is deliberate — a slow consumer loses
history, not correctness — but §12.1’s rule is that a discard is counted, and until
X-54 this one was reported with a tracing::debug! and nothing else, which is the exact
failure that section names.
It is not in SignallingCounts because a crate-wide total would
say that some call somewhere lost some events, which is not something anyone can act on.
The party who can act is the one holding this receiver: it fell behind, and resynchronising
from the next event’s snapshot is the documented recovery (docs/specs/app-contract.md
§5.1). Monotonic, and never reset by reading it.
Source§impl CallEvents
impl CallEvents
Sourcepub async fn recv(&mut self) -> Option<CallEvent>
pub async fn recv(&mut self) -> Option<CallEvent>
The next event, or None once the call has dropped its sender.
A well-behaved consumer only ever sees None after it has already seen
CallEvent::Ended — the sender is not dropped until the call’s own destructor runs,
which is after the last event has been queued.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CallEvents
impl RefUnwindSafe for CallEvents
impl Send for CallEvents
impl Sync for CallEvents
impl Unpin for CallEvents
impl UnsafeUnpin for CallEvents
impl UnwindSafe for CallEvents
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
§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