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
use *;
/// A bounded reactive counter.
///
/// Constructed via `Counter::new(min, max, step)`
/// (Lombok `New`); the counter starts at `i32::default()`
/// (`0`). Use [`Counter::set`] (or one of the mutator
/// methods) to set the initial value. The current value
/// is exposed as a `Signal<i32>` accessed through
/// `get_value()`. Mutators (`increment`, `decrement`,
/// `set`, `reset`) write through that signal, so any
/// render closure that reads `counter.get_value().get()`
/// re-renders when the value changes.