pub enum Mode {
Normal,
Choosing {
path: Vec<Seg>,
choices: Vec<Choice>,
selected: usize,
filter: String,
},
Editing {
buffer: String,
path: Vec<Seg>,
slot: EditSlot,
},
}Expand description
Interaction mode: normal navigation, or editing one text field of a node.
Variants§
Normal
Choosing
Picking a value off a list rather than typing one
(Model::begin_choose).
A mode of its own rather than an editor seeded with a list, because the
two take different keys: everything printable is a filter here and a
value there, and Enter commits a row rather than a buffer.
Fields
§
selected: usizeWhich of the filtered choices the cursor is on — see
Model::visible_choices.
Editing
Auto Trait Implementations§
impl Freeze for Mode
impl RefUnwindSafe for Mode
impl Send for Mode
impl Sync for Mode
impl Unpin for Mode
impl UnsafeUnpin for Mode
impl UnwindSafe for Mode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more