pub struct PubSubSink { /* private fields */ }
Available on crate feature
aio
only.Expand description
The sink part of a split async Pubsub.
The sink is used to subscribe and unsubscribe from channels. The stream part is independent from the sink, and dropping the sink doesn’t cause the stream part to stop working. The sink isn’t independent from the stream - dropping the stream will cause the sink to return errors on requests.
Implementations§
source§impl PubSubSink
impl PubSubSink
sourcepub async fn subscribe(
&mut self,
channel_name: impl ToRedisArgs,
) -> RedisResult<()>
pub async fn subscribe( &mut self, channel_name: impl ToRedisArgs, ) -> RedisResult<()>
Subscribes to a new channel.
sourcepub async fn unsubscribe(
&mut self,
channel_name: impl ToRedisArgs,
) -> RedisResult<()>
pub async fn unsubscribe( &mut self, channel_name: impl ToRedisArgs, ) -> RedisResult<()>
Unsubscribes from channel.
sourcepub async fn psubscribe(
&mut self,
channel_pattern: impl ToRedisArgs,
) -> RedisResult<()>
pub async fn psubscribe( &mut self, channel_pattern: impl ToRedisArgs, ) -> RedisResult<()>
Subscribes to a new channel with pattern.
sourcepub async fn punsubscribe(
&mut self,
channel_pattern: impl ToRedisArgs,
) -> RedisResult<()>
pub async fn punsubscribe( &mut self, channel_pattern: impl ToRedisArgs, ) -> RedisResult<()>
Unsubscribes from channel pattern.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PubSubSink
impl RefUnwindSafe for PubSubSink
impl Send for PubSubSink
impl Sync for PubSubSink
impl Unpin for PubSubSink
impl UnwindSafe for PubSubSink
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)