pub struct NamedMeasurable { /* private fields */ }Expand description
A named Measurable child of a CompoundStat.
Mirrors CompoundStat.NamedMeasurable. The stat is shared (Arc) because
the compound stat records into the same object the child metric measures, so
a record must be reflected in the measured value.
Implementations§
Source§impl NamedMeasurable
impl NamedMeasurable
Sourcepub fn new(name: MetricName, stat: Arc<dyn Measurable>) -> Self
pub fn new(name: MetricName, stat: Arc<dyn Measurable>) -> Self
Create a NamedMeasurable.
Sourcepub fn name(&self) -> &MetricName
pub fn name(&self) -> &MetricName
The metric name of this child.
Sourcepub fn stat(&self) -> Arc<dyn Measurable>
pub fn stat(&self) -> Arc<dyn Measurable>
The measurable backing this child.
Trait Implementations§
Source§impl Clone for NamedMeasurable
impl Clone for NamedMeasurable
Source§fn clone(&self) -> NamedMeasurable
fn clone(&self) -> NamedMeasurable
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NamedMeasurable
impl !RefUnwindSafe for NamedMeasurable
impl Send for NamedMeasurable
impl Sync for NamedMeasurable
impl Unpin for NamedMeasurable
impl UnsafeUnpin for NamedMeasurable
impl !UnwindSafe for NamedMeasurable
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