pub struct Monitor<C = Pin<Box<dyn AsyncStream + Send + Sync>>>(_);
Available on crate feature
aio
only.Expand description
Represents a Monitor
connection.
Implementations§
source§impl<C> Monitor<C>where
C: Unpin + AsyncRead + AsyncWrite + Send,
impl<C> Monitor<C>where
C: Unpin + AsyncRead + AsyncWrite + Send,
sourcepub fn new(con: Connection<C>) -> Self
pub fn new(con: Connection<C>) -> Self
Create a Monitor
from a Connection
sourcepub async fn monitor(&mut self) -> RedisResult<()>
pub async fn monitor(&mut self) -> RedisResult<()>
Deliver the MONITOR command to this Monitor
ing wrapper.
sourcepub fn on_message<T: FromRedisValue>(&mut self) -> impl Stream<Item = T> + '_
pub fn on_message<T: FromRedisValue>(&mut self) -> impl Stream<Item = T> + '_
Returns [Stream
] of FromRedisValue
values from this Monitor
ing connection
sourcepub fn into_on_message<T: FromRedisValue>(self) -> impl Stream<Item = T>
pub fn into_on_message<T: FromRedisValue>(self) -> impl Stream<Item = T>
Returns [Stream
] of FromRedisValue
values from this Monitor
ing connection