1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
use crate::*;
/// A handle to a browser interval timer created by `use_interval`.
///
/// Stores the numeric interval ID returned by `window.setInterval` so the
/// timer can be cancelled later via `clear_interval`.
///
/// # Fields
///
/// - `i32`: The interval ID assigned by the browser.
/// Reactive state for a stopwatch feature.
///
/// Contains only `Copy` signal fields so the struct can be freely
/// captured inside `html!` closures without causing `FnOnce` issues.
///
/// # Fields
///
/// - `Signal<i32>`: The elapsed seconds counter.
/// - `Signal<bool>`: Whether the stopwatch is currently running.
/// - `Signal<Option<IntervalHandle>>`: The active interval handle, if any.
/// Reactive state for a countdown timer feature.
///
/// Contains only `Copy` signal fields so the struct can be freely
/// captured inside `html!` closures without causing `FnOnce` issues.
///
/// # Fields
///
/// - `Signal<i32>`: The total countdown seconds.
/// - `Signal<i32>`: The remaining countdown seconds.
/// - `Signal<bool>`: Whether the countdown is currently running.
/// - `Signal<Option<IntervalHandle>>`: The active interval handle, if any.
/// - `Signal<String>`: The user input string for setting countdown seconds.