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
Auto Trait Implementations
impl !RefUnwindSafe for Subscriber
impl Send for Subscriber
impl Sync for Subscriber
impl Unpin for Subscriber
impl !UnwindSafe for Subscriber
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
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