pub struct RegisteredInstrument {
pub family: String,
pub unit: Option<String>,
pub instrument: InstrumentRef,
}Expand description
One registry entry: the bare family name, optional OpenMetrics unit, and the typed instrument.
family is the bare name as given to
Component::register_instrument. The _<unit> suffix per
SRD-40a §4.3 is applied at capture time (in
crate::snapshot::MetricSet::insert_metric_with_unit) so the
metric_family.name ends up suffixed and metric_family.unit
holds the unit. Unit None means the family is published as-is.
Fields§
§family: String§unit: Option<String>§instrument: InstrumentRefAuto Trait Implementations§
impl Freeze for RegisteredInstrument
impl RefUnwindSafe for RegisteredInstrument
impl Send for RegisteredInstrument
impl Sync for RegisteredInstrument
impl Unpin for RegisteredInstrument
impl UnsafeUnpin for RegisteredInstrument
impl UnwindSafe for RegisteredInstrument
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more