Skip to main content

UnavailableReason

Enum UnavailableReason 

Source
pub enum UnavailableReason {
    CounterReset,
    DeviceDisappeared,
    InterfaceRenamed,
    ProcessExited,
    ReadFailed,
    ParseFailed,
    Timeout,
    SkippedUnderLoad,
    LinkSpeedUnknown,
    NeedsSecondSample,
}
Expand description

Why a normally-available metric is missing from this particular sample.

The specification sketches TemporarilyUnavailable { reason: String }, but §4 explicitly permits a typed enum when a per-sample String is too costly. It is: a String in every field of every sample would allocate thousands of times per second. The human-readable message is produced at the UI layer by UnavailableReason::message.

Variants§

§

CounterReset

A cumulative counter moved backwards, so this sample’s delta is invalid.

§8.2 requires returning this rather than a huge or negative rate.

§

DeviceDisappeared

The device, mount, or interface vanished between two reads.

§

InterfaceRenamed

The interface was renamed, invalidating the previous counter baseline.

§

ProcessExited

The process exited between enumeration and the detail read (§8.2).

Expected during normal sampling and never worth a warning log (§14.1).

§

ReadFailed

The underlying read failed for a reason other than permissions.

§

ParseFailed

The data was present but did not match the expected format.

§

Timeout

Collection exceeded its time budget and was abandoned for this sample.

§

SkippedUnderLoad

Enrichment was skipped to stay inside a budget under high load (§16.2).

§

LinkSpeedUnknown

A utilization percentage was requested but the link speed is unknown.

§7.4 forbids rendering a network utilization percentage without a known link capacity.

§

NeedsSecondSample

The metric requires at least two samples and only one exists so far.

Implementations§

Source§

impl UnavailableReason

Source

pub const fn message(self) -> &'static str

A short, lower-case explanation suitable for a status line or tooltip.

Trait Implementations§

Source§

impl Clone for UnavailableReason

Source§

fn clone(&self) -> UnavailableReason

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for UnavailableReason

Source§

impl Debug for UnavailableReason

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for UnavailableReason

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for UnavailableReason

Source§

impl Hash for UnavailableReason

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for UnavailableReason

Source§

fn eq(&self, other: &UnavailableReason) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for UnavailableReason

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.