pub struct Monitor<C = Pin<Box<dyn AsyncStream + Send + Sync>>>(_);
Expand description
Represents a Monitor
connection.
Implementations
sourceimpl<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<'a, T: FromRedisValue>(
&'a mut self
) -> impl Stream<Item = T> + 'a
pub fn on_message<'a, T: FromRedisValue>(
&'a mut self
) -> impl Stream<Item = T> + 'a
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
Auto Trait Implementations
impl<C = Pin<Box<dyn AsyncStream + Send + Sync + 'static, Global>>> !RefUnwindSafe for Monitor<C>
impl<C> Send for Monitor<C> where
C: Send,
impl<C> Sync for Monitor<C> where
C: Sync,
impl<C> Unpin for Monitor<C> where
C: Unpin,
impl<C = Pin<Box<dyn AsyncStream + Send + Sync + 'static, Global>>> !UnwindSafe for Monitor<C>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more