pub enum Event<UserEvent>{
Keyboard(KeyEvent),
WindowResize(u16, u16),
FocusGained,
FocusLost,
Paste(String),
Tick,
None,
User(UserEvent),
}
Expand description
An event raised by a user interaction
Variants§
Keyboard(KeyEvent)
A keyboard event
WindowResize(u16, u16)
This event is raised after the terminal window is resized
FocusGained
Window focus gained
FocusLost
Window focus lost
Paste(String)
Clipboard content pasted
Tick
A ui tick event (should be configurable)
None
Unhandled event; Empty event
User(UserEvent)
User event; won’t be used by standard library or by default input event listener; but can be used in user defined ports
Trait Implementations§
source§impl<U> From<Event> for Event<U>
impl<U> From<Event> for Event<U>
source§fn from(e: XtermEvent) -> Self
fn from(e: XtermEvent) -> Self
Converts to this type from the input type.
source§impl<UserEvent> PartialEq for Event<UserEvent>
impl<UserEvent> PartialEq for Event<UserEvent>
source§impl<UserEvent> PartialOrd for Event<UserEvent>
impl<UserEvent> PartialOrd for Event<UserEvent>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<UserEvent> Eq for Event<UserEvent>
impl<UserEvent> StructuralPartialEq for Event<UserEvent>
Auto Trait Implementations§
impl<UserEvent> RefUnwindSafe for Event<UserEvent>where
UserEvent: RefUnwindSafe,
impl<UserEvent> Send for Event<UserEvent>where
UserEvent: Send,
impl<UserEvent> Sync for Event<UserEvent>where
UserEvent: Sync,
impl<UserEvent> Unpin for Event<UserEvent>where
UserEvent: Unpin,
impl<UserEvent> UnwindSafe for Event<UserEvent>where
UserEvent: UnwindSafe,
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