pub struct ConfigSubscription { /* private fields */ }Expand description
A held settings watch. Dropping it sends a best-effort cancellation.
Implementations§
Source§impl ConfigSubscription
impl ConfigSubscription
Sourcepub async fn next(&mut self) -> Result<Option<ConfigWatchEvent>, CallError>
pub async fn next(&mut self) -> Result<Option<ConfigWatchEvent>, CallError>
Yield queued events before reporting a terminal error. Ok(None) means
a clean daemon end or caller cancellation; use Self::ended to tell
them apart. A malformed event cancels the watch and returns a decode error.
Sourcepub async fn ended(&mut self) -> SubscriptionEnd
pub async fn ended(&mut self) -> SubscriptionEnd
Wait for the terminal outcome, independently of draining events. A daemon
refusal/closure retains its code, message and detail in Error; a lost
connection is ConnectionLost, and local unsubscribe is Cancelled.
Clean daemon endings are StreamEnd or Response (with its body).
Sourcepub fn unsubscribe(&self) -> Result<(), CallError>
pub fn unsubscribe(&self) -> Result<(), CallError>
Cancel the held request; Self::ended reports Cancelled promptly.
Auto Trait Implementations§
impl !Freeze for ConfigSubscription
impl !RefUnwindSafe for ConfigSubscription
impl !UnwindSafe for ConfigSubscription
impl Forget for ConfigSubscription
impl Move for ConfigSubscription
impl Send for ConfigSubscription
impl Sync for ConfigSubscription
impl Unpin for ConfigSubscription
impl UnsafeUnpin for ConfigSubscription
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