[−][src]Struct metrix::instruments::switches::Flag
A Flag
which can have the states true
or false
The Flag
reacts on observations with values. A value
of 0
sets the Flag
to false
, '1' will set the
Flag
to true
. For all other values the behaviour is undefined.
Methods
impl Flag
[src]
pub fn new_with_defaults<T: Into<String>>(
name: T,
initial_state: Option<bool>
) -> Self
[src]
name: T,
initial_state: Option<bool>
) -> Self
pub fn name(&self) -> &str
[src]
Gets the name of this Flag
pub fn set_name<T: Into<String>>(&mut self, name: T)
[src]
Set the name if this Flag
.
The name is a path segment within a Snapshot
pub fn set_title<T: Into<String>>(&mut self, title: T)
[src]
Sets the title
of this Flag
.
A title can be part of a descriptive Snapshot
pub fn set_description<T: Into<String>>(&mut self, description: T)
[src]
Sets the description
of this Flag
.
A description can be part of a descriptive Snapshot
pub fn show_inverted(&mut self, name_alternation: NameAlternation)
[src]
Show the inverted value. Name will be adjusted with name_alternation
.
pub fn show_inverted_prefixed<T: Into<String>>(&mut self, prefix: T)
[src]
Show the inverted value. Name will be prefixed with prefix
.
pub fn show_inverted_postfixed<T: Into<String>>(&mut self, postfix: T)
[src]
Show the inverted value. Name will be postfixed with postfix
.
pub fn show_inverted_renamed<T: Into<String>>(&mut self, new_name: T)
[src]
Show the inverted value. Name will be renamed with new_name
.
pub fn state(&self) -> Option<bool>
[src]
Returns the current state
Trait Implementations
impl Updates for Flag
[src]
impl Instrument for Flag
[src]
impl Descriptive for Flag
[src]
impl PutsSnapshot for Flag
[src]
fn put_snapshot(&self, into: &mut Snapshot, descriptive: bool)
[src]
Auto Trait Implementations
impl Send for Flag
impl Sync for Flag
impl Unpin for Flag
impl UnwindSafe for Flag
impl RefUnwindSafe for Flag
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,