pub enum Event {
Show 17 variants
Insert(char),
Enter,
Backspace,
Tab,
Left,
Right,
Home,
End,
Interrupt,
Eof,
Suspend,
Abort,
Up,
Down,
Clear,
LeftWord,
RightWord,
}
Expand description
Edit event emitted by Editor::next_event
to crate::Prompt
Variants§
Insert(char)
Inserts a character and moves the cursor
See also Editor::insert
Enter
Enter key. Submits the current input or inserts a newline if Editor::is_multiline
is true
Backspace
Removes the character behind the cursor
Tab
Indents or completes the word under the cursor depending on Editor::complete
Left
Moves back the cursor
Right
Moves forward the cursor
Home
Moves the cursor to the start of the input
End
Moves the cursor to the end of the input
Interrupt
Returns Interrupt
if the buffer is empty, or clears the buffer
Eof
Returns Eof
if the buffer is empty
Suspend
Suspends the program (Unix only)
Abort
Aborts the program, usually triggering a coredump
Up
Selects previous history input
Down
Selects next history input
Clear
Clears the screen
LeftWord
Moves back one word
RightWord
Moves forward one word
Trait Implementations§
impl Copy for Event
impl Eq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin 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