pub struct Monitor<C = Pin<Box<dyn AsyncStream + Send + Sync>>>(/* private fields */);
Expand description
Represents a Monitor
connection.
Implementations§
Source§impl<C> Monitor<C>
impl<C> Monitor<C>
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
Auto Trait Implementations§
impl<C> Freeze for Monitor<C>where
C: Freeze,
impl<C = Pin<Box<dyn AsyncStream + Sync + Send>>> !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 + Sync + Send>>> !UnwindSafe for Monitor<C>
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