#[non_exhaustive]pub enum Event {
Pointer(PointerEvent),
Keyboard(KeyEvent),
Ime(ImeEvent),
Focus(FocusEvent),
File(FileEvent),
Window(WindowEvent),
}Expand description
Top-level event envelope delivered to the runtime.
Possible values wrap pointer, keyboard, IME, focus, file, and window payloads.
§Examples
use ailloli_ui_core::event::{Event, FocusEvent};
let event = Event::Focus(FocusEvent::new(true));
assert!(matches!(event, Event::Focus(_)));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)
Pointer move, button, or wheel.
Keyboard(KeyEvent)
Key press/release with optional text.
Ime(ImeEvent)
IME composition lifecycle.
Focus(FocusEvent)
Runtime focus/blur notification.
File(FileEvent)
Platform-neutral file hover/drop notification.
Window(WindowEvent)
Window resize, focus, close, redraw.
Trait Implementations§
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
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