pub struct QuestionSelection {
pub cursor: usize,
pub chosen: Vec<usize>,
pub other_text: String,
pub note: String,
pub value: String,
pub order: Vec<usize>,
pub grabbed: bool,
}Expand description
Live selection state for one question.
Fields§
§cursor: usizeHighlighted row for arrow-key navigation. Row layout:
0..n options, n = the “Other” free-text row, and for multi-select
n+1 = the Submit row.
chosen: Vec<usize>Chosen option indices. Single-select holds at most one; multi-select any.
other_text: StringFree-text typed into the “Other” row — the universal escape hatch. When non-empty it contributes to the answer alongside (multi) or instead of (single) the chosen options.
note: StringOptional free-text note attached to this question (press n to edit).
Rides back with the answer to capture intent the options didn’t cover.
value: StringTyped value for input kinds (Text/Number/Date/Path).
order: Vec<usize>Current option ordering for a Rank question (indices into options);
empty means the default 0..n order.
grabbed: boolRank: whether the item under the cursor is “picked up” for moving.
Trait Implementations§
Source§impl Clone for QuestionSelection
impl Clone for QuestionSelection
Source§fn clone(&self) -> QuestionSelection
fn clone(&self) -> QuestionSelection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more