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

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.