pub enum Input {
Key(KeyEvent),
Paste(String),
Focus(FocusChange),
Mouse(MouseEvent),
}Expand description
Terminal input as it reaches an application.
The terminal session decides which of these the terminal produces at all:
bracketed paste turns a paste into one Input::Paste instead of a run of
keys, focus reporting produces Input::Focus, and keyboard enhancement
decides whether a key release can be reported at all. Those are options on
the runtime’s entry point, not on the subscription.
Text arrives as KeyCode::Char keys and as pastes; there is no separate
text event. A size change is not input — it is the Surface source.
Variants§
Key(KeyEvent)
A key the terminal reported.
Paste(String)
A bracketed paste, delivered whole rather than as its keys.
Focus(FocusChange)
The terminal window gained or lost focus.
Mouse(MouseEvent)
A mouse action reported while capture is enabled.
Trait Implementations§
impl Eq for Input
impl StructuralPartialEq for Input
Auto Trait Implementations§
impl Freeze for Input
impl RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl UnsafeUnpin for Input
impl UnwindSafe for Input
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