pub struct CommonMetricData {
pub name: String,
pub category: String,
pub send_in_pings: Vec<String>,
pub lifetime: Lifetime,
pub disabled: bool,
pub dynamic_label: Option<String>,
}Expand description
The common set of data shared across all different metric types.
Fields§
§name: StringThe metric’s name.
category: StringThe metric’s category.
send_in_pings: Vec<String>List of ping names to include this metric in.
lifetime: LifetimeThe metric’s lifetime.
disabled: boolWhether or not the metric is disabled.
Disabled metrics are never recorded.
dynamic_label: Option<String>Dynamic label.
When a LabeledMetric
Implementations§
Source§impl CommonMetricData
impl CommonMetricData
Sourcepub fn new<A, B, C>(category: A, name: B, ping_name: C) -> CommonMetricData
pub fn new<A, B, C>(category: A, name: B, ping_name: C) -> CommonMetricData
Create a new metadata object.
Sourcepub fn should_record(&self) -> bool
pub fn should_record(&self) -> bool
Whether this metric should be recorded.
Sourcepub fn storage_names(&self) -> &[String]
pub fn storage_names(&self) -> &[String]
The list of storages this metric should be recorded into.
Trait Implementations§
Source§impl Clone for CommonMetricData
impl Clone for CommonMetricData
Source§fn clone(&self) -> CommonMetricData
fn clone(&self) -> CommonMetricData
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 moreSource§impl Debug for CommonMetricData
impl Debug for CommonMetricData
Source§impl Default for CommonMetricData
impl Default for CommonMetricData
Source§fn default() -> CommonMetricData
fn default() -> CommonMetricData
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CommonMetricData
impl RefUnwindSafe for CommonMetricData
impl Send for CommonMetricData
impl Sync for CommonMetricData
impl Unpin for CommonMetricData
impl UnwindSafe for CommonMetricData
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