pub struct TimedStep<'a, A> {
pub expired: Option<Vec<KeyInput>>,
pub step: Step<'a, A>,
}Expand description
The result of a single TimedPending::feed call.
This is an exhaustive struct — adding a field is a breaking change,
chosen deliberately so the compiler catches unhandled cases (the same
design principle behind Match and Step being exhaustive enums). The
#[must_use] attribute ensures the caller cannot silently discard it.
§Exhaustiveness regression test
The following doctest destructures TimedStep without .. so that adding
a new field causes a compile error — making any future field addition a
self-aware, visible breaking change:
use keymap_seq::TimedStep;
use keymap_seq::Step;
fn handle<A>(ts: TimedStep<'_, A>) {
// Destructure every field — no `..` — so a future field addition
// is a compile error (exhaustiveness regression test).
let TimedStep { expired, step } = ts;
let _ = expired;
let _ = step;
}Fields§
§expired: Option<Vec<KeyInput>>Keys from the buffer that was discarded because the inter-key gap
exceeded the window. When Some, the Vec is guaranteed non-empty.
None means the previous key (if any) arrived within the window.
step: Step<'a, A>The outcome of processing the new key after the expiry check.