#[non_exhaustive]pub enum CompletionOutcome {
Success,
Failure,
Cancelled,
Other(String),
}Expand description
Outcome classification for a completion event.
#[non_exhaustive] so future terminal states (e.g. Suspended
promoted to a terminal distinct from Cancelled) land additively.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Success
Failure
Cancelled
Other(String)
Outcome the backend surfaced but this crate version does not recognise. The raw string is retained so operator tooling can still log it.
Implementations§
Source§impl CompletionOutcome
impl CompletionOutcome
Sourcepub fn from_wire(s: &str) -> Self
pub fn from_wire(s: &str) -> Self
Map a wire-string outcome to the typed enum. Unknown strings
fall through to CompletionOutcome::Other rather than an
error — completion events are advisory and a new producer
variant must not crash old subscribers.
Trait Implementations§
Source§impl Clone for CompletionOutcome
impl Clone for CompletionOutcome
Source§fn clone(&self) -> CompletionOutcome
fn clone(&self) -> CompletionOutcome
Returns a duplicate of the value. Read more
1.0.0 · 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 CompletionOutcome
impl Debug for CompletionOutcome
Source§impl PartialEq for CompletionOutcome
impl PartialEq for CompletionOutcome
impl Eq for CompletionOutcome
impl StructuralPartialEq for CompletionOutcome
Auto Trait Implementations§
impl Freeze for CompletionOutcome
impl RefUnwindSafe for CompletionOutcome
impl Send for CompletionOutcome
impl Sync for CompletionOutcome
impl Unpin for CompletionOutcome
impl UnsafeUnpin for CompletionOutcome
impl UnwindSafe for CompletionOutcome
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