summaryrefslogtreecommitdiffstats
path: root/third_party/rust/glean-core/src/traits/mod.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /third_party/rust/glean-core/src/traits/mod.rs
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/glean-core/src/traits/mod.rs')
-rw-r--r--third_party/rust/glean-core/src/traits/mod.rs50
1 files changed, 50 insertions, 0 deletions
diff --git a/third_party/rust/glean-core/src/traits/mod.rs b/third_party/rust/glean-core/src/traits/mod.rs
new file mode 100644
index 0000000000..c4bcf7cdd6
--- /dev/null
+++ b/third_party/rust/glean-core/src/traits/mod.rs
@@ -0,0 +1,50 @@
+// 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/.
+
+//! API definitions for the different metric types supported by the Glean SDK.
+//!
+//! Individual metric types implement this trait to expose the specific metrics API.
+//! It can be used by wrapping implementations to guarantee API conformance.
+
+mod boolean;
+mod counter;
+mod custom_distribution;
+mod datetime;
+mod event;
+mod labeled;
+mod memory_distribution;
+mod numerator;
+mod ping;
+mod quantity;
+mod rate;
+mod string;
+mod string_list;
+mod text;
+mod timespan;
+mod timing_distribution;
+mod url;
+mod uuid;
+
+pub use self::boolean::Boolean;
+pub use self::counter::Counter;
+pub use self::custom_distribution::CustomDistribution;
+pub use self::datetime::Datetime;
+pub use self::event::Event;
+pub use self::event::EventRecordingError;
+pub use self::event::ExtraKeys;
+pub use self::event::NoExtraKeys;
+pub use self::labeled::Labeled;
+pub use self::memory_distribution::MemoryDistribution;
+pub use self::numerator::Numerator;
+pub use self::ping::Ping;
+pub use self::quantity::Quantity;
+pub use self::rate::Rate;
+pub use self::string::String;
+pub use self::string_list::StringList;
+pub use self::text::Text;
+pub use self::timespan::Timespan;
+pub use self::timing_distribution::TimingDistribution;
+pub use self::url::Url;
+pub use self::uuid::Uuid;
+pub use crate::histogram::HistogramType;