Chapter 10½: inside budget/src
One file, lib.rs, with its tests at the bottom. In order: day and date
(a UTC day and how to write it); Meter, Hold and Exhausted, with
Meter::hold, settle, observe and used; Which and key; Visits,
which admits a visitor's request or not within VISIT_WINDOW_MS; and the
messages, Ask, Counted, Status and Told.
Try it.
cargo test -p budget. Read the test names: they are the rules in plain words, froma_hold_is_refused_once_the_day_cannot_cover_ittonobody_is_remembered_past_their_minute.
| File | What |
|---|---|
| lib.rs | Meters, holds, visits, and the messages; tests at the end. |
← Previous: Chapter 10, budget/ · Up: budget · Next: Chapter 11, card/ →