Trait PubSubCommandAsync

Source
pub trait PubSubCommandAsync {
    // Required methods
    fn subscribe<C: ToString, G, S>(
        &mut self,
        channel: C,
        cmd_callback: G,
        callback: S,
    ) -> Result<(), RedisError>
       where G: Send + 'static + Fn(Result<RedisResult, RedisError>),
             S: Send + 'static + Fn(RedisResult);
    fn psubscribe<C: ToString, G, S>(
        &mut self,
        channel: C,
        cmd_callback: G,
        callback: S,
    ) -> Result<(), RedisError>
       where G: Send + 'static + Fn(Result<RedisResult, RedisError>),
             S: Send + 'static + Fn(RedisResult);
    fn publish<C: ToString, M: ToString, G>(
        &mut self,
        channel: C,
        message: M,
        cmd_callback: G,
    ) -> Result<(), RedisError>
       where G: Send + 'static + Fn(Result<RedisResult, RedisError>);
}

Required Methods§

Source

fn subscribe<C: ToString, G, S>( &mut self, channel: C, cmd_callback: G, callback: S, ) -> Result<(), RedisError>
where G: Send + 'static + Fn(Result<RedisResult, RedisError>), S: Send + 'static + Fn(RedisResult),

Source

fn psubscribe<C: ToString, G, S>( &mut self, channel: C, cmd_callback: G, callback: S, ) -> Result<(), RedisError>
where G: Send + 'static + Fn(Result<RedisResult, RedisError>), S: Send + 'static + Fn(RedisResult),

Source

fn publish<C: ToString, M: ToString, G>( &mut self, channel: C, message: M, cmd_callback: G, ) -> Result<(), RedisError>
where G: Send + 'static + Fn(Result<RedisResult, RedisError>),

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§