pub trait PubSubConnection {
    // Required methods
    fn subscribe<'life0, 'async_trait>(
        &'life0 mut self,
        channels: Vec<String>,
    ) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn unsubscribe<'life0, 'async_trait>(
        &'life0 mut self,
        channels: Vec<String>,
    ) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn psubscribe<'life0, 'async_trait>(
        &'life0 mut self,
        patterns: Vec<String>,
    ) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn punsubscribe<'life0, 'async_trait>(
        &'life0 mut self,
        patterns: Vec<String>,
    ) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn listen<'life0, 'async_trait>(
        &'life0 mut self,
        message_tx: UnboundedSender<PubSubMessage>,
    ) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn publish<'life0, 'async_trait>(
        &'life0 mut self,
        channel: String,
        message: String,
    ) -> Pin<Box<dyn Future<Output = RedisResult<i64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}Expand description
Trait for Pub/Sub connections
Required Methods§
Sourcefn subscribe<'life0, 'async_trait>(
    &'life0 mut self,
    channels: Vec<String>,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
 
fn subscribe<'life0, 'async_trait>(
    &'life0 mut self,
    channels: Vec<String>,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
Subscribe to channels
Sourcefn unsubscribe<'life0, 'async_trait>(
    &'life0 mut self,
    channels: Vec<String>,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
 
fn unsubscribe<'life0, 'async_trait>(
    &'life0 mut self,
    channels: Vec<String>,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
Unsubscribe from channels
Sourcefn psubscribe<'life0, 'async_trait>(
    &'life0 mut self,
    patterns: Vec<String>,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
 
fn psubscribe<'life0, 'async_trait>(
    &'life0 mut self,
    patterns: Vec<String>,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
Subscribe to patterns
Sourcefn punsubscribe<'life0, 'async_trait>(
    &'life0 mut self,
    patterns: Vec<String>,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
 
fn punsubscribe<'life0, 'async_trait>(
    &'life0 mut self,
    patterns: Vec<String>,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
Unsubscribe from patterns
Sourcefn listen<'life0, 'async_trait>(
    &'life0 mut self,
    message_tx: UnboundedSender<PubSubMessage>,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
 
fn listen<'life0, 'async_trait>(
    &'life0 mut self,
    message_tx: UnboundedSender<PubSubMessage>,
) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
Start listening for messages