pub struct MetricConfig {
pub selectors: SelectorList,
pub metric_id: u32,
pub metric_type: DataType,
pub event_codes: Vec<u32>,
pub upload_once: Option<bool>,
pub project_id: Option<u32>,
}
Expand description
Configuration for a single metric to map from an Inspect property to a Cobalt metric.
Fields§
§selectors: SelectorList
Selector identifying the metric to sample via the diagnostics platform.
metric_id: u32
Cobalt metric id to map the selector to.
metric_type: DataType
Data type to transform the metric to.
event_codes: Vec<u32>
Event codes defining the dimensions of the Cobalt metric. Note: Order matters, and must match the order of the defined dimensions in the Cobalt metric file. Missing field means the same as empty list.
upload_once: Option<bool>
Optional boolean specifying whether to upload the specified metric only once, the first time it becomes available to the sampler.
project_id: Option<u32>
Optional project id. When present this project id will be used instead of the top-level project id.
Trait Implementations§
Source§impl Clone for MetricConfig
impl Clone for MetricConfig
Source§fn clone(&self) -> MetricConfig
fn clone(&self) -> MetricConfig
Returns a copy 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 MetricConfig
impl Debug for MetricConfig
Source§impl<'de> Deserialize<'de> for MetricConfig
impl<'de> Deserialize<'de> for MetricConfig
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 MetricConfig
impl PartialEq for MetricConfig
impl StructuralPartialEq for MetricConfig
Auto Trait Implementations§
impl Freeze for MetricConfig
impl RefUnwindSafe for MetricConfig
impl Send for MetricConfig
impl Sync for MetricConfig
impl Unpin for MetricConfig
impl UnwindSafe for MetricConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)