Enum Outcome
#[non_exhaustive]pub enum Outcome {
Ok,
Contended,
Lost,
Failed,
Unsupported,
}Expand description
How the measured operation ended.
Closed for the same reason Metric is: this is the second and last label
dimension an exporter may use. The set is deliberately coarse — it answers
“did it work, and if not, in which of the ways this system fails” and
nothing more. Detail belongs in the StudyEvent
stream or in an error, both of which are already bounded.
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.
Ok
The operation succeeded.
Contended
The operation eventually succeeded after retrying or waiting because another worker held the target.
Lost
The operation lost a race and gave the work up cleanly.
Failed
The operation failed.
Unsupported
The backend or peer does not implement the operation.
Implementations§
§impl Outcome
impl Outcome
pub const fn name(self) -> &'static str
pub const fn name(self) -> &'static str
The stable wire name of this outcome.
Stable in the same sense as Metric::name.
Trait Implementations§
impl Copy for Outcome
impl Eq for Outcome
§impl Ord for Outcome
impl Ord for Outcome
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
§impl PartialOrd for Outcome
impl PartialOrd for Outcome
impl StructuralPartialEq for Outcome
Auto Trait Implementations§
impl Freeze for Outcome
impl RefUnwindSafe for Outcome
impl Send for Outcome
impl Sync for Outcome
impl Unpin for Outcome
impl UnsafeUnpin for Outcome
impl UnwindSafe for Outcome
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