pub struct TomatoTimer {
    pub time_per_round: f32,
    pub time_per_break: f32,
    pub session_count: i32,
    pub status: TimerStatus,
}
Expand description

The tomato timer data structure. We derive Deserialize/Serialize so we can persist app state on shutdown.

Fields§

§time_per_round: f32§time_per_break: f32§session_count: i32§status: TimerStatus

Implementations§

Called once before the first frame.

Trait Implementations§

Called by the frame work to save state before shutdown.

Called each time the UI needs repainting, which may be many times per second. Put your widgets into a SidePanel, TopPanel, CentralPanel, Window or Area.

Called when the user attempts to close the desktop window and/or quit the application. Read more
Called once on shutdown, after Self::save. Read more
Time between automatic calls to Self::save
The size limit of the web app canvas. Read more
Background color for the app, e.g. what is sent to gl.clearColor. This is the background of your windows if you don’t set a central panel.
Controls whether or not the native window position and size will be persisted (only if the “persistence” feature is enabled).
Controls whether or not the egui memory (window positions etc) will be persisted (only if the “persistence” feature is enabled).
If true a warm-up call to Self::update will be issued where ctx.memory().everything_is_visible() will be set to true. Read more
Called each time after the rendering the UI. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more