Struct telemetry::plain::Enum [−][src]
Enumerated histograms.
Enumerated histogram generalize Count histograms to families of keys known at compile-time. They are useful, for instance, to know how often users have picked a specific choice from several, or how many times each kind of error has been triggered, etc.
With SerializationFormat::SimpleJson
, these histograms are
serialized as an array of numbers, in the order of enum values.
Implementations
impl<K> Enum<K> where
K: Flatten,
[src]
K: Flatten,
pub fn new(service: &Service, name: String) -> Enum<K>
[src]
Create a new Enum histogram with a given name.
Argument name
is used as key when processing and exporting
the data. Each name
must be unique to the Service
.
Panics
If name
is already used by another histogram in service
.
Trait Implementations
impl<K> Clone for Enum<K> where
K: Flatten,
[src]
K: Flatten,
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<K> Histogram<K> for Enum<K> where
K: Flatten,
[src]
K: Flatten,
Auto Trait Implementations
impl<K> !RefUnwindSafe for Enum<K>
impl<K> Send for Enum<K> where
K: Send,
K: Send,
impl<K> !Sync for Enum<K>
impl<K> Unpin for Enum<K> where
K: Unpin,
K: Unpin,
impl<K> !UnwindSafe for Enum<K>
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>,