pub struct MetricCatalog { /* private fields */ }Expand description
Catalog of metric descriptors registered by application subsystems.
Implementations§
Source§impl MetricCatalog
impl MetricCatalog
Sourcepub fn register(&mut self, descriptor: MetricDescriptor) -> Result<()>
pub fn register(&mut self, descriptor: MetricDescriptor) -> Result<()>
Registers one metric descriptor.
Sourcepub fn descriptors(&self) -> &[MetricDescriptor]
pub fn descriptors(&self) -> &[MetricDescriptor]
Returns all descriptors in registration order.
Sourcepub fn subsystem<'a>(
&'a self,
subsystem: &'a str,
) -> impl Iterator<Item = &'a MetricDescriptor> + 'a
pub fn subsystem<'a>( &'a self, subsystem: &'a str, ) -> impl Iterator<Item = &'a MetricDescriptor> + 'a
Returns descriptors owned by subsystem.
Trait Implementations§
Source§impl Debug for MetricCatalog
impl Debug for MetricCatalog
Source§impl Default for MetricCatalog
impl Default for MetricCatalog
Source§fn default() -> MetricCatalog
fn default() -> MetricCatalog
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MetricCatalog
impl RefUnwindSafe for MetricCatalog
impl Send for MetricCatalog
impl Sync for MetricCatalog
impl Unpin for MetricCatalog
impl UnsafeUnpin for MetricCatalog
impl UnwindSafe for MetricCatalog
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