pub struct StreamSubscription { /* private fields */ }Expand description
A live Request::Subscribe stream yielding typed StreamFrames (snapshot, then
events/lagged notices) until the daemon side closes. Holds the connection’s write half for its
lifetime — a subscriber only reads, but dropping the writer would half-close the socket. Drop
the subscription to disconnect (there is no request channel back).
Implementations§
Source§impl StreamSubscription
impl StreamSubscription
Sourcepub async fn next(&mut self) -> Result<Option<StreamFrame>, ClientError>
pub async fn next(&mut self) -> Result<Option<StreamFrame>, ClientError>
The next frame, or None when the daemon closed the stream. A frame this crate’s
StreamFrame does not model (a NEWER daemon’s frame type) surfaces as
ClientError::Malformed — a forward-compatible consumer reads raw frames via
ControlClient::open_stream instead.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for StreamSubscription
impl !Sync for StreamSubscription
impl !UnwindSafe for StreamSubscription
impl Freeze for StreamSubscription
impl Send for StreamSubscription
impl Unpin for StreamSubscription
impl UnsafeUnpin for StreamSubscription
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