Struct glean::CommonMetricData
source · [−]pub struct CommonMetricData {
pub name: String,
pub category: String,
pub send_in_pings: Vec<String, Global>,
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, Global>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<T> factory creates the specific
metric to be recorded to, dynamic labels are stored in the specific
label so that we can validate them when the Glean singleton is
available.
Implementations
sourceimpl CommonMetricData
impl CommonMetricData
sourcepub fn new<A, B, C>(category: A, name: B, ping_name: C) -> CommonMetricDatawhere
A: Into<String>,
B: Into<String>,
C: Into<String>,
pub fn new<A, B, C>(category: A, name: B, ping_name: C) -> CommonMetricDatawhere
A: Into<String>,
B: Into<String>,
C: Into<String>,
Creates 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
sourceimpl Clone for CommonMetricData
impl Clone for CommonMetricData
sourcefn clone(&self) -> CommonMetricData
fn clone(&self) -> CommonMetricData
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for CommonMetricData
impl Debug for CommonMetricData
sourceimpl Default for CommonMetricData
impl Default for CommonMetricData
sourcefn default() -> CommonMetricData
fn default() -> CommonMetricData
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for CommonMetricData
impl<'de> Deserialize<'de> for CommonMetricData
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<CommonMetricData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<CommonMetricData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for CommonMetricData
impl Serialize for CommonMetricData
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for CommonMetricData
impl Send for CommonMetricData
impl Sync for CommonMetricData
impl Unpin for CommonMetricData
impl UnwindSafe for CommonMetricData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more