pub struct WatchStream(/* private fields */);Implementations§
Source§impl WatchStream
impl WatchStream
Sourcepub async fn message(&mut self) -> Result<Option<String>>
pub async fn message(&mut self) -> Result<Option<String>>
§Example
use mcmc_rs::{Connection, WatchArg};
for (mut c1, mut c2) in [
(Connection::default().await?, Connection::default().await?),
(
Connection::unix_connect("/tmp/memcached0.sock").await?,
Connection::unix_connect("/tmp/memcached0.sock").await?,
),
(
Connection::tls_connect("localhost", 11216, "cert.pem").await?,
Connection::tls_connect("localhost", 11216, "cert.pem").await?,
),
] {
let mut w = c1.watch(&[WatchArg::Fetchers]).await?;
c2.get(b"key").await?;
let result = w.message().await?;
assert!(result.is_some())
}Auto Trait Implementations§
impl Freeze for WatchStream
impl RefUnwindSafe for WatchStream
impl Send for WatchStream
impl Sync for WatchStream
impl Unpin for WatchStream
impl UnsafeUnpin for WatchStream
impl UnwindSafe for WatchStream
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