pub struct Mutable { /* private fields */ }
Expand description

metrics::registry::Storage backed by a prometheus::Registry and allowing to change a help description of the registered prometheus metrics in runtime.

This metrics::registry::Storage is capable of registering metrics in its prometheus::Registry on the fly. By default, the prometheus::default_registry() is used.

Errors

This Mutable storage returns metric::Fallible in its metrics::registry::Storage interface, because it cannot panic, as is called inside metrics::Registry and, so, may poison its inner locks. That’s why possible errors are passed through up to the metrics::Recorder using this Mutable storage, and should be resolved there.

Implementations§

Registers the provided prometheus metric in the underlying prometheus::Registry in the way making it usable via this metrics::registry::Storage (and, so, metrics crate interfaces).

Accepts only the following prometheus metrics:

Errors

If the underlying prometheus::Registry fails to register the provided metric.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Returns a Collection of Metrics stored in a Mutable storage.
Returns a Collection of Metrics stored in a Mutable storage.
Returns a Collection of Metrics stored in a Mutable storage.
The type used for counters.
The type used for gauges.
The type used for histograms.
Creates an empty counter.
Creates an empty gauge.
Creates an empty histogram.

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

Returns the argument unchanged.

Calls U::from(self).

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

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.