Struct dipstick::StatsMapScope
source · pub struct StatsMapScope { /* private fields */ }
Expand description
A BTreeMap wrapper to receive metrics or stats values. Every received value for a metric replaces the previous one (if any).
Implementations§
source§impl StatsMapScope
impl StatsMapScope
sourcepub fn into_map(self) -> BTreeMap<String, MetricValue>
pub fn into_map(self) -> BTreeMap<String, MetricValue>
Extract the backing BTreeMap.
Trait Implementations§
source§impl Clone for StatsMapScope
impl Clone for StatsMapScope
source§fn clone(&self) -> StatsMapScope
fn clone(&self) -> StatsMapScope
Returns a copy 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 moresource§impl Default for StatsMapScope
impl Default for StatsMapScope
source§fn default() -> StatsMapScope
fn default() -> StatsMapScope
Returns the “default value” for a type. Read more
source§impl Flush for StatsMapScope
impl Flush for StatsMapScope
source§impl From<StatsMapScope> for BTreeMap<String, MetricValue>
impl From<StatsMapScope> for BTreeMap<String, MetricValue>
source§fn from(map: StatsMapScope) -> Self
fn from(map: StatsMapScope) -> Self
Converts to this type from the input type.
source§impl InputScope for StatsMapScope
impl InputScope for StatsMapScope
source§fn new_metric(&self, name: MetricName, _kind: InputKind) -> InputMetric
fn new_metric(&self, name: MetricName, _kind: InputKind) -> InputMetric
Define a generic metric of the specified type.
It is preferable to use counter() / marker() / timer() / gauge() methods.
source§impl WithAttributes for StatsMapScope
impl WithAttributes for StatsMapScope
source§fn get_attributes(&self) -> &Attributes
fn get_attributes(&self) -> &Attributes
Return attributes of component.
source§fn mut_attributes(&mut self) -> &mut Attributes
fn mut_attributes(&mut self) -> &mut Attributes
Return attributes of component for mutation.
source§fn with_attributes<F: Fn(&mut Attributes)>(&self, edit: F) -> Self
fn with_attributes<F: Fn(&mut Attributes)>(&self, edit: F) -> Self
Clone the component and mutate its attributes at once.