Struct Model Copy item path Source pub struct Model {
pub interval: Duration ,
}Expand description Model for the stopwatch component.
How long to wait before every tick. Defaults to 1 second.
ID returns the unique ID of the model.
Init starts the stopwatch.
Start starts the stopwatch.
Stop stops the stopwatch.
Toggle stops the stopwatch if it is running and starts it if it is
stopped.
Reset resets the stopwatch to 0.
Running returns true if the stopwatch is running or false if it is
stopped.
Update handles the timer tick.
Elapsed returns the time elapsed.
View of the timer component.
Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
Helper to downcast to Any.
Consumes the boxed message and returns it as a Box<dyn Any>, so the
program can move the concrete message out of the trait object (used to
dispatch the commands carried by BatchMsg/SequenceMsg).
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.