Struct metrix::instruments::switches::StaircaseTimer[][src]

pub struct StaircaseTimer { /* fields omitted */ }

A StaircaseTimer is 'tapped' by an Observation and then stays on for some time.

The StaircaseTimer works exactly like a switch in a staircase: You press the switch and the light will stay on for some time. Here it is an Observation that pushes the switch and the light is a boolean that will be set to true for some time. When triggered while already on, the time being true will be prolonged.

The state written to a Snapshot can be inverted.

Methods

impl StaircaseTimer
[src]

Gets the name of this Gauge

Set the name if this Gauge.

The name is a path segment within a Snapshot

Sets the title of this Gauge.

A title can be part of a descriptive Snapshot

Sets the description of this Gauge.

A description can be part of a descriptive Snapshot

Set whether the current value should be inverted in a snapshot or not

Default is false

The current value should be inverted in a snapshot

Same as self.set_invert(true);

return whether invert is on or off

Sets duration after which the internal state switches back to false

Default is 60 seconds

Gets duration after which the internal state switches back to false

Returns the current state

Trait Implementations

impl Instrument for StaircaseTimer
[src]

impl PutsSnapshot for StaircaseTimer
[src]

Puts the current snapshot values into the given Snapshot thereby following the guidelines of PutsSnapshot. Read more

impl Updates for StaircaseTimer
[src]

Update the internal state according to the given Update. Read more

impl Descriptive for StaircaseTimer
[src]

Auto Trait Implementations