pub struct IsUnsubscribed(/* private fields */);Available on crate feature
server only.Expand description
Represents a subscription until it is unsubscribed.
Implementations§
Source§impl IsUnsubscribed
impl IsUnsubscribed
Sourcepub fn is_unsubscribed(&self) -> bool
pub fn is_unsubscribed(&self) -> bool
Returns true if the unsubscribe method has been invoked or the subscription has been canceled.
This can be called multiple times as the element in the channel is never removed.
Sourcepub async fn unsubscribed(&self)
pub async fn unsubscribed(&self)
Wrapper over [tokio::sync::mpsc::Sender::closed]
§Cancel safety
This method is cancel safe. Once the channel is closed, it stays closed forever and all future calls to closed will return immediately.
Trait Implementations§
Source§impl Clone for IsUnsubscribed
impl Clone for IsUnsubscribed
Auto Trait Implementations§
impl Freeze for IsUnsubscribed
impl RefUnwindSafe for IsUnsubscribed
impl Send for IsUnsubscribed
impl Sync for IsUnsubscribed
impl Unpin for IsUnsubscribed
impl UnsafeUnpin for IsUnsubscribed
impl UnwindSafe for IsUnsubscribed
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes