pub struct RedisPubSubSubscriber { /* private fields */ }Expand description
A Pub/Sub subscription backed by a dedicated fred client, so its message stream and channel
state are isolated from other subscribers and from the publishing pool.
Trait Implementations§
Source§impl Debug for RedisPubSubSubscriber
impl Debug for RedisPubSubSubscriber
Source§impl Drop for RedisPubSubSubscriber
impl Drop for RedisPubSubSubscriber
Source§impl Subscriber for RedisPubSubSubscriber
impl Subscriber for RedisPubSubSubscriber
Source§fn stream(
&mut self,
) -> impl Stream<Item = Result<Self::Message, Self::Error>> + Send + '_
fn stream( &mut self, ) -> impl Stream<Item = Result<Self::Message, Self::Error>> + Send + '_
Yields one message per Pub/Sub delivery.
§Cancel safety
Dropping the returned stream between items is safe. Because Pub/Sub has no buffering, any message published while no stream is polling is lost (this is Redis Pub/Sub semantics, not a limitation of this client).
Source§type Message = RedisPubSubMessage
type Message = RedisPubSubMessage
The message type yielded by this subscriber.
Source§type Error = RedisError
type Error = RedisError
The error type yielded by the stream when delivery fails.
Auto Trait Implementations§
impl !RefUnwindSafe for RedisPubSubSubscriber
impl !UnwindSafe for RedisPubSubSubscriber
impl Freeze for RedisPubSubSubscriber
impl Send for RedisPubSubSubscriber
impl Sync for RedisPubSubSubscriber
impl Unpin for RedisPubSubSubscriber
impl UnsafeUnpin for RedisPubSubSubscriber
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more