Enum metrix::Observation[][src]

pub enum Observation<L> {
    Observed {
        label: L,
        count: u64,
        timestamp: Instant,
    },
    ObservedOne {
        label: L,
        timestamp: Instant,
    },
    ObservedOneValue {
        label: L,
        value: u64,
        timestamp: Instant,
    },
}

An observation that has been made.

Be aware that not all instruments handle all observations or values. E.g. a Meter does not take the value of an Observation::ObservedOneValue into account but simply counts the observation as one occurence.

Variants

Observed many occurances at th given timestamp

Fields of Observed

Observed one occurrence at the given timestamp

Fields of ObservedOne

Observed one occurence with a value at a given timestamp.

Fields of ObservedOneValue

Methods

impl<L> Observation<L> where
    L: Clone
[src]

Extracts the label L from an observation.

Scale by the given ValueScaling

This will clone the Observation

impl<L> Observation<L>
[src]

Trait Implementations

impl<T> From<Observation<T>> for LabelAndUpdate<T>
[src]

Performs the conversion.

impl<L: Clone> Clone for Observation<L>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<L> Send for Observation<L> where
    L: Send

impl<L> Sync for Observation<L> where
    L: Sync