Struct telemetry::plain::Flag [−][src]
Flag histograms.
This histogram has only two states. Until the first call to
record()
, it is unset. Once record()
has been called once,
it is set and won’t change anymore. This type is useful if you
need to track whether a feature was ever used during a session.
With SerializationFormat::SimpleJson
, these histograms are
serialized as a plain number 0 (unset)/1 (set).
Implementations
impl Flag
[src]
pub fn new(service: &Service, name: String) -> Flag
[src]
Create a new Flag 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 Clone for Flag
[src]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Histogram<()> for Flag
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Flag
impl Send for Flag
impl !Sync for Flag
impl Unpin for Flag
impl !UnwindSafe for Flag
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>,