Struct async_nats::Subscription [−][src]
pub struct Subscription { /* fields omitted */ }Expand description
A subscription to a subject.
Due to async limitations (lack of AsyncDrop etc…),
please call Subscription::unsubscribe().await manually
before dropping Subscription to avoid blocking the
runtime.
Implementations
Gets the next message, or returns None if the subscription
has been unsubscribed or the connection is closed.
Stops listening for new messages, but the remaining queued messages can still be received.
Stops listening for new messages and discards the remaining queued
messages. This should always be called before dropping
async_nats::Subscription to avoid blocking the non-async Drop
implementation.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Subscriptionimpl Send for Subscriptionimpl Sync for Subscriptionimpl Unpin for Subscriptionimpl !UnwindSafe for Subscription