Struct glean::private::LabeledMetric [−][src]
Developer-facing API for recording labeled metrics.
Instances of this type are automatically generated by the parser
at build time, allowing developers to record values that were previously
registered in the metrics.yaml file.
Unlike most metric types, LabeledMetric
does not have its own corresponding
storage, but records metrics for the underlying metric type T
in the storage
for that type.
Implementations
impl<T> LabeledMetric<T> where
T: AllowLabeled,
[src]
T: AllowLabeled,
pub fn new(meta: CommonMetricData, labels: Option<Vec<String>>) -> Self
[src]
The public constructor used by automatically generated metrics.
impl<T> LabeledMetric<T> where
T: AllowLabeled + Clone,
[src]
T: AllowLabeled + Clone,
pub fn get(&self, __arg1: &str) -> T
[src]
pub fn test_get_num_recorded_errors<'a, S: Into<Option<&'a str>>>(
&self,
__arg1: ErrorType,
__arg2: S
) -> i32
[src]
&self,
__arg1: ErrorType,
__arg2: S
) -> i32
Trait Implementations
impl<T: Clone + AllowLabeled> Clone for LabeledMetric<T> where
T::Inner: Clone,
[src]
T::Inner: Clone,
fn clone(&self) -> LabeledMetric<T>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T> Labeled<T> for LabeledMetric<T> where
T: AllowLabeled + Clone,
[src]
T: AllowLabeled + Clone,
Auto Trait Implementations
impl<T> RefUnwindSafe for LabeledMetric<T> where
<T as Sealed>::Inner: RefUnwindSafe,
<T as Sealed>::Inner: RefUnwindSafe,
impl<T> Send for LabeledMetric<T> where
<T as Sealed>::Inner: Send + Sync,
<T as Sealed>::Inner: Send + Sync,
impl<T> Sync for LabeledMetric<T> where
<T as Sealed>::Inner: Send + Sync,
<T as Sealed>::Inner: Send + Sync,
impl<T> Unpin for LabeledMetric<T>
impl<T> UnwindSafe for LabeledMetric<T> where
<T as Sealed>::Inner: RefUnwindSafe,
<T as Sealed>::Inner: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,