pub struct MetricSample { /* private fields */ }Expand description
One flattened sample from a Prometheus exposition.
Implementations§
Source§impl MetricSample
impl MetricSample
pub fn new( name: MetricName, labels: BTreeMap<MetricLabelName, MetricLabelValue>, value: MetricValue, ) -> Self
pub fn name(&self) -> &MetricName
pub fn labels(&self) -> &BTreeMap<MetricLabelName, MetricLabelValue>
pub fn value(&self) -> MetricValue
Trait Implementations§
Source§impl Clone for MetricSample
impl Clone for MetricSample
Source§impl Debug for MetricSample
impl Debug for MetricSample
Source§impl PartialEq for MetricSample
impl PartialEq for MetricSample
impl StructuralPartialEq for MetricSample
Auto Trait Implementations§
impl Freeze for MetricSample
impl RefUnwindSafe for MetricSample
impl Send for MetricSample
impl Sync for MetricSample
impl Unpin for MetricSample
impl UnsafeUnpin for MetricSample
impl UnwindSafe for MetricSample
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