pub enum AppEvent {
Key(AppKeyEvent),
Mouse(AppMouseEvent),
Resize {
width: u16,
height: u16,
},
FocusGained,
FocusLost,
Paste(String),
Unsupported,
}Expand description
Runtime customization surface for advanced integrations.
Input event emitted by a custom Runtime implementation.
Most applications can use CrosstermRuntime. Implement this surface only when you need to
feed keyboard, mouse, or terminal events into crate::TuiApp from another runtime.
Variants§
Key(AppKeyEvent)
Keyboard input.
Mouse(AppMouseEvent)
Mouse input.
Resize
Terminal resize event.
FocusGained
Focus gained event.
FocusLost
Focus lost event.
Paste(String)
Paste payload.
Unsupported
Event variants the app does not currently model.
Trait Implementations§
Source§impl From<MouseEvent> for AppEvent
impl From<MouseEvent> for AppEvent
Source§fn from(value: MouseEvent) -> Self
fn from(value: MouseEvent) -> Self
Converts to this type from the input type.
impl Eq for AppEvent
impl StructuralPartialEq for AppEvent
Auto Trait Implementations§
impl Freeze for AppEvent
impl RefUnwindSafe for AppEvent
impl Send for AppEvent
impl Sync for AppEvent
impl Unpin for AppEvent
impl UnsafeUnpin for AppEvent
impl UnwindSafe for AppEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more