Struct prometheus_utils::Observations[][src]

pub struct Observations<T: Ord + Zero + Copy> { /* fields omitted */ }
Expand description

Collect observations, which are sampled as a Sample.

Implementations

Constructor. The name parameter has no semantic meaning, and is only exposed by Observations::name().

Name associated with the observations, as provided in constructor.

Take a sample of the observations. Calculates a Sample corresponding to the current state, and then clears that state.

Attempt to record this T as part of the collection of observations. “Attempt”, because if a reader is currently using this ObservationSet, the observation is dropped. This prevents recording from being a blocking operation

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.