pub struct Subscription<T> { /* private fields */ }Expand description
A subscription to updates for a specific type/identifier combination.
Implementations§
Source§impl<T> Subscription<T>
impl<T> Subscription<T>
Sourcepub async fn recv(&mut self) -> Option<AssertionUpdate<T>>
pub async fn recv(&mut self) -> Option<AssertionUpdate<T>>
Receives the next assertion or retraction update.
Returns Some(update) when an update is available, or None if the channel has been closed (all senders
dropped). If messages were missed due to the subscriber falling behind, the missed messages are skipped and the
next available update is returned.
Auto Trait Implementations§
impl<T> Freeze for Subscription<T>
impl<T> RefUnwindSafe for Subscription<T>where
T: RefUnwindSafe,
impl<T> Send for Subscription<T>where
T: Send,
impl<T> Sync for Subscription<T>
impl<T> Unpin for Subscription<T>where
T: Unpin,
impl<T> UnsafeUnpin for Subscription<T>
impl<T> UnwindSafe for Subscription<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
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> 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::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Track for T
impl<T> Track for T
§fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
Instruments this type by attaching the given allocation group token, returning a
Tracked wrapper. Read more§fn in_current_allocation_group(self) -> Tracked<Self>
fn in_current_allocation_group(self) -> Tracked<Self>
Instruments this type by attaching the current allocation group, returning a
Tracked wrapper. Read more