pub struct OperationalEventStreamHealthSubscription { /* private fields */ }Expand description
Task-free subscription to sticky authoritative-stream health.
Self::current exposes the initial state immediately. Self::changed
waits for either a published health transition or loss of the operational
event receiver. Receiver loss is converted to the same sticky Degraded
state inline, so subscribing does not create an idle background task that
could outlive core lifecycle drain.
Implementations§
Source§impl OperationalEventStreamHealthSubscription
impl OperationalEventStreamHealthSubscription
Sourcepub fn current(&self) -> OperationalEventStreamHealth
pub fn current(&self) -> OperationalEventStreamHealth
Return current sticky health without waiting.
Sourcepub async fn changed(&mut self) -> OperationalEventStreamHealth
pub async fn changed(&mut self) -> OperationalEventStreamHealth
Wait for degradation and return the new sticky state.
Degraded is terminal for this process-local stream. Calling this
method after observing it therefore returns Degraded immediately;
correctness consumers should stop accepting work at that point.
Trait Implementations§
Source§impl Clone for OperationalEventStreamHealthSubscription
impl Clone for OperationalEventStreamHealthSubscription
Source§fn clone(&self) -> OperationalEventStreamHealthSubscription
fn clone(&self) -> OperationalEventStreamHealthSubscription
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for OperationalEventStreamHealthSubscription
impl !UnwindSafe for OperationalEventStreamHealthSubscription
impl Freeze for OperationalEventStreamHealthSubscription
impl Send for OperationalEventStreamHealthSubscription
impl Sync for OperationalEventStreamHealthSubscription
impl Unpin for OperationalEventStreamHealthSubscription
impl UnsafeUnpin for OperationalEventStreamHealthSubscription
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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