Struct rtrtr::metrics::Collection
source ·
[−]pub struct Collection { /* fields omitted */ }
Expand description
A collection of metrics sources.
This type provides a shared collection. I.e., if a value is cloned, both clones will reference the same collection. Both will see newly added sources.
Such new sources can be registered with the register
method. A string with all the current values of all known sources can be
obtained via the assemble
method.
Implementations
Registers a new source with the collection.
The name of the component registering the source is passed via name
.
The source itself is given as a weak pointer so that it gets dropped
when the owning component terminates.
Assembles metrics output.
Produces an output of all the sources in the collection in the given format and returns it as a string.
Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for Collection
impl Send for Collection
impl Sync for Collection
impl Unpin for Collection
impl !UnwindSafe for Collection
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more