pub struct CompletionNotifier { /* private fields */ }Expand description
Multi-consumer completion notification channel for a workflow execution.
Implementations§
Source§impl CompletionNotifier
impl CompletionNotifier
Sourcepub fn subscribe(&self) -> Receiver<Option<TerminalOutcome>>
pub fn subscribe(&self) -> Receiver<Option<TerminalOutcome>>
Subscribes a result awaiter to the eventual terminal outcome.
Sourcepub fn notify(&self, outcome: TerminalOutcome)
pub fn notify(&self, outcome: TerminalOutcome)
Publishes the terminal outcome to all current and future subscribers.
The value is stored even when no result waiter is currently subscribed, so a waiter that subscribed from a still-held handle before deregistration can observe the terminal outcome instead of hanging on an unfulfilled channel.
Sourcepub fn is_completed(&self) -> bool
pub fn is_completed(&self) -> bool
Returns true once a terminal outcome has been published.
Trait Implementations§
Source§impl Clone for CompletionNotifier
impl Clone for CompletionNotifier
Source§fn clone(&self) -> CompletionNotifier
fn clone(&self) -> CompletionNotifier
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 moreSource§impl Debug for CompletionNotifier
impl Debug for CompletionNotifier
Source§impl Default for CompletionNotifier
impl Default for CompletionNotifier
impl Eq for CompletionNotifier
Auto Trait Implementations§
impl !RefUnwindSafe for CompletionNotifier
impl !UnwindSafe for CompletionNotifier
impl Freeze for CompletionNotifier
impl Send for CompletionNotifier
impl Sync for CompletionNotifier
impl Unpin for CompletionNotifier
impl UnsafeUnpin for CompletionNotifier
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.