#[non_exhaustive]pub enum RebindVerdict<'a, A> {
BreaksReserved {
reserved: KeyInput,
reason: BreakReason,
},
Allowed {
shadows: Option<&'a A>,
legacy: LegacyForm,
},
}Expand description
What validate_rebind concluded.
This is #[non_exhaustive] so that additive verdicts (e.g. an advisory
“allowed but unreachable on legacy terminals”) can be added without
breaking callers. Match both arms with an explicit binding for all known
fields so the compiler surfaces any future field additions.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BreaksReserved
Refused. The proposed chord would break the caller’s escape hatch.
Fields
reason: BreakReasonThe structural reason the rebind is refused.
Allowed
Allowed. The rebind does not threaten any reserved key.
Fields
shadows: Option<&'a A>The action that proposed currently resolves to via the layer
stack, if any. Some(&a) means the rebind would silently override
that action in the target layer — worth surfacing in a UI.
legacy: LegacyFormHow proposed fares on a legacy 7-bit C0 terminal. This is
carried here so the caller can surface the legacy story alongside
the safety verdict in a single call.