// This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. //! This file contains the Generated Glean Metrics API //! //! The contents of this module are generated by //! `toolkit/components/glean/build_scripts/glean_parser_ext/run_glean_parser.py`, from //! 'toolkit/components/glean/metrics.yaml`. #[cfg(not(feature = "cargo-clippy"))] include!(concat!( env!("MOZ_TOPOBJDIR"), "/toolkit/components/glean/api/src/metrics.rs" )); // When running clippy the linter, `MOZ_TOPOBJDIR` is not set // (and the `metrics.rs` file might not even be generated yet), // so we need to manually define some things we expect from it so the rest of the build can assume // it's there. // See https://bugzilla.mozilla.org/show_bug.cgi?id=1674726. #[cfg(feature = "cargo-clippy")] #[allow(dead_code)] pub(crate) mod __glean_metric_maps { use std::collections::HashMap; use crate::private::*; use once_cell::sync::Lazy; pub static TIMESPAN_MAP: Lazy>> = Lazy::new(HashMap::new); pub static COUNTER_MAP: Lazy>> = Lazy::new(HashMap::new); pub static BOOLEAN_MAP: Lazy>> = Lazy::new(HashMap::new); pub static DATETIME_MAP: Lazy>> = Lazy::new(HashMap::new); pub static STRING_MAP: Lazy>> = Lazy::new(HashMap::new); pub static MEMORY_DISTRIBUTION_MAP: Lazy>> = Lazy::new(HashMap::new); pub static STRING_LIST_MAP: Lazy>> = Lazy::new(HashMap::new); pub static UUID_MAP: Lazy>> = Lazy::new(HashMap::new); pub(crate) fn event_record_wrapper( _metric_id: u32, _extra: Option>, ) -> Result<(), EventRecordingError> { Err(EventRecordingError::InvalidId) } pub(crate) fn event_record_wrapper_str( _metric_id: u32, _extra: Option>, ) -> Result<(), EventRecordingError> { Err(EventRecordingError::InvalidId) } pub(crate) fn event_test_get_value_wrapper( _metric_id: u32, _storage_name: &str, ) -> Option> { None } }