pub struct DaemonSubscription { /* private fields */ }Expand description
A live push subscription opened by DaemonClient::subscribe.
The daemon keeps sending DaemonReply frames on the connection; call
next in a loop to consume them. It exposes reads only — the
protocol treats any further write as a cancel — and dropping it (e.g. on
Ctrl-C) ends the stream.
Implementations§
Source§impl DaemonSubscription
impl DaemonSubscription
Sourcepub async fn next(&mut self) -> Option<Result<DaemonReply>>
pub async fn next(&mut self) -> Option<Result<DaemonReply>>
Reads the next pushed reply, None once the daemon closes the stream
(EOF), or Some(Err(..)) on a read/decode failure.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DaemonSubscription
impl RefUnwindSafe for DaemonSubscription
impl Send for DaemonSubscription
impl Sync for DaemonSubscription
impl Unpin for DaemonSubscription
impl UnsafeUnpin for DaemonSubscription
impl UnwindSafe for DaemonSubscription
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