pub struct ChoiceOption {
pub id: OptionId,
pub role: SemanticRole,
pub label: String,
pub key: String,
pub aliases: Vec<String>,
}Expand description
One mutually-exclusive option of a choice control.
The option carries the SemanticRole, not the control: a permission
question has no single meaning — each of its options does. allow once
means Allow, deny (default) means Deny, and they are options of one
question rather than two questions.
Fields§
§id: OptionIdStable within the control; the definition commits to it.
role: SemanticRoleWhat picking this option means.
label: StringHuman-readable label. Labels never confer authority (ADR law 2).
key: StringThe accelerator a keyboard surface offers for this option — a,
d. Presentation, but NOT only presentation: the terminal
authorizes on it, so it is part of what the definition means and
cannot live in the view.
Omitted when empty, so an option that offers no accelerator is byte-identical to one written before this field existed.
aliases: Vec<String>Hidden inputs that also select this option — n/N for a deny.
Never rendered, and never able to shadow another option’s
canonical id or key: matching is canonical-first, and ambiguity
denies.
Omitted when empty, for the same reason as key.