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: String
The metric’s name.
category: String
The metric’s category.
send_in_pings: Vec<String, Global>
List of ping names to include this metric in.
lifetime: Lifetime
The metric’s lifetime.
disabled: bool
Whether 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) -> CommonMetricData where
A: Into<String>,
B: Into<String>,
C: Into<String>,
pub fn new<A, B, C>(category: A, name: B, ping_name: C) -> CommonMetricData where
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 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl 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
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more