#[non_exhaustive]pub enum Event<'a> {
Pointer(PointerEvent),
Key(KeyEvent<'a>),
Ime(Ime<'a>),
FocusGained,
FocusLost,
}Expand description
What a widget receives.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Pointer(PointerEvent)
The pointer (mouse, pen, touch) pressed, released, moved, scrolled, entered or left.
Key(KeyEvent<'a>)
A key went down or up while the widget, or a widget inside it, has focus.
Ime(Ime<'a>)
An input method composed or committed text for the focused widget.
FocusGained
The widget became the focused one.
FocusLost
The widget stopped being the focused one.
Trait Implementations§
impl<'a> Copy for Event<'a>
impl<'a> StructuralPartialEq for Event<'a>
Auto Trait Implementations§
impl<'a> Freeze for Event<'a>
impl<'a> RefUnwindSafe for Event<'a>
impl<'a> Send for Event<'a>
impl<'a> Sync for Event<'a>
impl<'a> Unpin for Event<'a>
impl<'a> UnsafeUnpin for Event<'a>
impl<'a> UnwindSafe for Event<'a>
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