pub struct MetricTemplate {
pub selectors: Vec<String>,
pub metric_id: Option<MetricId>,
pub metric_name: Option<String>,
pub metric_type: MetricType,
pub event_codes: Vec<EventCodeSpec>,
pub upload_once: bool,
}Expand description
Template for a single FIRE metric.
Exactly one of metric_id and metric_name must be specified.
Fields§
§selectors: Vec<String>Selector templates identifying the metric to sample via the diagnostics platform.
metric_id: Option<MetricId>ID of the Cobalt metric to map the selector to.
metric_name: Option<String>Name of the Cobalt metric to map the selector to.
metric_type: MetricTypeData type to transform the metric to.
event_codes: Vec<EventCodeSpec>Event codes defining the dimensions of the Cobalt metric, after the FIRE component ID dimension. Missing field means the same as empty list.
upload_once: boolOptional boolean specifying whether to upload the specified metric only once, the first time it becomes available to the sampler. Defaults to false.
Trait Implementations§
Source§impl Debug for MetricTemplate
impl Debug for MetricTemplate
Source§impl<'de> Deserialize<'de> for MetricTemplate
impl<'de> Deserialize<'de> for MetricTemplate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MetricTemplate
impl PartialEq for MetricTemplate
impl StructuralPartialEq for MetricTemplate
Auto Trait Implementations§
impl Freeze for MetricTemplate
impl RefUnwindSafe for MetricTemplate
impl Send for MetricTemplate
impl Sync for MetricTemplate
impl Unpin for MetricTemplate
impl UnsafeUnpin for MetricTemplate
impl UnwindSafe for MetricTemplate
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more