Struct mini_redis::client::Subscriber[][src]

pub struct Subscriber { /* fields omitted */ }
Expand description

A client that has entered pub/sub mode.

Once clients subscribe to a channel, they may only perform pub/sub related commands. The Client type is transitioned to a Subscriber type in order to prevent non-pub/sub methods from being called.

Implementations

Returns the set of channels currently subscribed to.

Receive the next message published on a subscribed channel, waiting if necessary.

None indicates the subscription has been terminated.

Convert the subscriber into a Stream yielding new messages published on subscribed channels.

Subscriber does not implement stream itself as doing so with safe code is non trivial. The usage of async/await would require a manual Stream implementation to use unsafe code. Instead, a conversion function is provided and the returned stream is implemented with the help of the async-stream crate.

Subscribe to a list of new channels

Unsubscribe to a list of new channels

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more