pub enum EventKind {
Key(KeyEvent),
Mouse(MouseEvent),
Scroll {
column: u16,
row: u16,
delta: isize,
modifiers: KeyModifiers,
},
Resize(u16, u16),
Tick,
}Expand description
The actual event payload
Variants§
Key(KeyEvent)
Keyboard event
Mouse(MouseEvent)
Mouse event
Scroll
Scroll event with position, delta, and modifiers
Resize(u16, u16)
Terminal resize
Tick
Periodic tick
Implementations§
Source§impl EventKind
impl EventKind
Sourcepub fn event_type(&self) -> EventType
pub fn event_type(&self) -> EventType
Get the event type for this event kind
Sourcepub fn is_global(&self) -> bool
pub fn is_global(&self) -> bool
Check if this is a global event (should be delivered to all components)
Sourcepub fn is_broadcast(&self) -> bool
pub fn is_broadcast(&self) -> bool
Check if this is a broadcast event (delivered to all subscribers, never consumed)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EventKind
impl RefUnwindSafe for EventKind
impl Send for EventKind
impl Sync for EventKind
impl Unpin for EventKind
impl UnsafeUnpin for EventKind
impl UnwindSafe for EventKind
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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