pub enum Event {
Line(String),
Eof,
CancelPrompt,
Resize {
width: u16,
height: u16,
},
FocusChanged {
focused: bool,
},
BufferChanged,
BackTab,
Escape,
Action(String),
}Expand description
High-level events surfaced to the caller.
Variants§
Line(String)
The user submitted a line (pressed Enter by default, Ctrl-Enter,
or ran submit-prompt with no completion preview).
Eof
The user signalled EOF (Ctrl-D on empty line).
CancelPrompt
The user requested prompt cancellation with a second consecutive Ctrl-C.
Resize
The terminal was resized.
FocusChanged
The terminal reported focus gained or lost.
BufferChanged
The input buffer changed (or the completion menu cycled, opened, or closed). Caller should redraw any prompt-derived UI.
BackTab
Shift+Tab pressed outside an open completion menu.
Escape
Escape pressed outside an open completion menu.
Action(String)
A binding requested an application-defined action without touching the prompt draft.
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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