[][src]Struct metrix::instruments::other_instruments::DataDisplay

pub struct DataDisplay { /* fields omitted */ }

A DataDisplay simply displays the value of an observation

The DataDisplay has the capability to reset its value after a given time. This can be useful if manually resetting the value after a finished "task" is not desired or possible.

By default the value does not reset. The reset_value can be set to a specific value. By default it is None.

Methods

impl DataDisplay[src]

pub fn new<T: Into<String>>(name: T) -> DataDisplay[src]

pub fn new_with_defaults<T: Into<String>>(name: T) -> DataDisplay[src]

pub fn get_name(&self) -> &str[src]

pub fn set_name<T: Into<String>>(&mut self, name: T)[src]

pub fn name<T: Into<String>>(self, name: T) -> Self[src]

pub fn set_title<T: Into<String>>(&mut self, title: T)[src]

pub fn title<T: Into<String>>(self, title: T) -> Self[src]

pub fn set_description<T: Into<String>>(&mut self, description: T)[src]

pub fn description<T: Into<String>>(self, description: T) -> Self[src]

pub fn set_reset_after(&mut self, d: Duration)[src]

Sets duration after which the internal state switches back to reset value

Default is 60 seconds

pub fn reset_after(self, d: Duration) -> Self[src]

Sets duration after which the internal state switches back to reset value

Default is 60 seconds

pub fn get_reset_after(&self) -> Option<Duration>[src]

Gets duration after which the internal state switches back to reset value

pub fn set_reset_value<T: Into<ItemKind>>(&mut self, v: T)[src]

Sets reset value to be displayed after a reset and as an initial value

Default is None

pub fn reset_value<T: Into<ItemKind>>(self, v: T) -> Self[src]

Sets reset value to be displayed after a reset and as an initial value

Default is None

pub fn get_reset_value(&self) -> Option<&ItemKind>[src]

gets reset value to be displayed after a reset

Default is None

pub fn accept<L: Eq + Send + 'static, F: Into<LabelFilter<L>>>(
    self,
    accept: F
) -> InstrumentAdapter<L, Self>
[src]

pub fn for_label<L: Eq + Send + 'static>(
    self,
    label: L
) -> InstrumentAdapter<L, Self>
[src]

Creates an InstrumentAdapter that makes this instrument react on observations on the given label.

pub fn for_labels<L: Eq + Send + 'static>(
    self,
    labels: Vec<L>
) -> InstrumentAdapter<L, Self>
[src]

Creates an InstrumentAdapter that makes this instrument react on observations with the given labels.

If labels is empty the instrument will not react to any observations

pub fn for_all_labels<L: Eq + Send + 'static>(
    self
) -> InstrumentAdapter<L, Self>
[src]

Creates an InstrumentAdapter that makes this instrument react on all observations.

pub fn for_labels_by_predicate<L, P>(
    self,
    label_predicate: P
) -> InstrumentAdapter<L, Self> where
    L: Eq + Send + 'static,
    P: Fn(&L) -> bool + Send + 'static, 
[src]

Creates an InstrumentAdapter that makes this instrument react on observations with labels specified by the predicate.

pub fn adapter<L: Eq + Send + 'static>(self) -> InstrumentAdapter<L, Self>[src]

Creates an InstrumentAdapter that makes this instrument to no observations.

pub fn value(&self) -> Option<ItemKind>[src]

Returns the current state

Trait Implementations

impl Descriptive for DataDisplay[src]

impl Instrument for DataDisplay[src]

impl PutsSnapshot for DataDisplay[src]

impl Updates for DataDisplay[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,