Skip to navigation

Generated from cargo doc --no-deps -p nemo-fabric-core.

pub enum Measurement<T> {
    NotCollected,
    Available {
        value: T,
    },
    Unlimited,
    Unavailable {
        reason: String,
    },
    Unsupported {
        reason: String,
    },
}

A measured value or its availability. Unlimited is distinct from unknown and is used only for limits. No missing measurement is replaced with zero.

Variants

NotCollected

NotCollected

Its metric group was explicitly excluded from collection.

Available

Available

A value was read successfully.

Fields

value: T

Observed numeric value, with units defined by its containing field.

Unlimited

Unlimited

No limit is configured in the visible hierarchy.

Unavailable

Unavailable

The source could not be read or its counter changed epoch.

Fields

reason: String

Safe reason the reading is unknown.

Unsupported

Unsupported

The operating system or controller does not expose this measurement.

Fields

reason: String

Missing platform or controller capability.

Trait Implementations

impl<T: Clone> Clone for Measurement<T>

impl<T: Clone> Clone for Measurement<T>

clone

fn clone(&self) -> Measurement<T>

clone_from

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

impl<T: Debug> Debug for Measurement<T>

impl<T: Debug> Debug for Measurement<T>

fmt

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

impl<'de, T> Deserialize<'de> for Measurement<T>where T: Deserialize<'de>,

impl<'de, T> Deserialize<'de> for Measurement<T>where
    T: Deserialize<'de>,

deserialize

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,

impl<T> JsonSchema for Measurement<T>where T: JsonSchema,

impl<T> JsonSchema for Measurement<T>where
    T: JsonSchema,

schema_name

fn schema_name() -> Cow<'static, str>

schema_id

fn schema_id() -> Cow<'static, str>

json_schema

fn json_schema(generator: &mut SchemaGenerator) -> Schema

inline_schema

fn inline_schema() -> bool

impl<T: PartialEq> PartialEq for Measurement<T>

impl<T: PartialEq> PartialEq for Measurement<T>

eq

fn eq(&self, other: &Measurement<T>) -> bool

ne

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

impl<T> Serialize for Measurement<T>where T: Serialize,

impl<T> Serialize for Measurement<T>where
    T: Serialize,

serialize

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
    __S: Serializer,

impl<T: PartialEq> StructuralPartialEq for Measurement<T>

impl<T: PartialEq> StructuralPartialEq for Measurement<T>