pub struct TunnelEvents { /* private fields */ }Expand description
A tunnel’s events as they happen, after the history it has kept: from
subscribe_events on a Registration or a
Connection.
Every subscriber reads at its own pace from its own queue. One that falls more than 128 events behind is told how many it missed, and goes on from there. A subscription does not keep its tunnel alive: once the tunnel stops and its cleanup has reported, the stream ends.
Implementations§
Source§impl TunnelEvents
impl TunnelEvents
Sourcepub async fn recv(&mut self) -> Option<Result<TunnelEvent, EventsLagged>>
pub async fn recv(&mut self) -> Option<Result<TunnelEvent, EventsLagged>>
The next event, or None once the stream has ended. An error says
events were missed; the tunnel’s diagnostics() is the state to
reconcile with, and the stream goes on. Cancel-safe.
Auto Trait Implementations§
impl !RefUnwindSafe for TunnelEvents
impl !UnwindSafe for TunnelEvents
impl Freeze for TunnelEvents
impl Send for TunnelEvents
impl Sync for TunnelEvents
impl Unpin for TunnelEvents
impl UnsafeUnpin for TunnelEvents
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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