pub trait MetricVecExt: MetricVec_ {
// Required method
fn get_delete_on_drop_metric<L: PromLabelsExt>(
&self,
labels: L,
) -> DeleteOnDropMetric<Self, L>;
}Available on crate feature
metrics only.Expand description
Extension trait for metrics vectors.
It adds a method to create a concrete metric from the vector that gets removed from the vector when the concrete metric is dropped.
Required Methods§
Sourcefn get_delete_on_drop_metric<L: PromLabelsExt>(
&self,
labels: L,
) -> DeleteOnDropMetric<Self, L>
fn get_delete_on_drop_metric<L: PromLabelsExt>( &self, labels: L, ) -> DeleteOnDropMetric<Self, L>
Returns a metric that deletes its labels from this metrics vector when dropped.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".