Expand description
Cleanroom Rust port of upstream Go source file: timer/timer.go
Upstream Target Tag / Version: v2.1.0
A simple timeout component.
Structs§
- Model
- Model of the timer component.
- Start
Stop Msg - StartStopMsg is used to start and stop the timer.
- TickMsg
- TickMsg is a message that is sent on every timer tick.
- Timeout
Msg - TimeoutMsg is a message that is sent once when the timer times out.
Functions§
- new
- New creates a new timer with the given timeout and default 1s interval.
- with_
interval - WithInterval is an option for setting the interval between ticks. Pass as
an argument to
new.