#[non_exhaustive]pub enum WindowEvent {
MetricsChanged(WindowMetrics),
RenderingSuspended,
RenderingResumed(WindowMetrics),
RedrawRequested(WindowMetrics),
CloseRequested,
Input(InputEvent),
}Expand description
A window lifecycle event delivered while pumping the native event queue.
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.
MetricsChanged(WindowMetrics)
The drawable extent or backing scale changed.
RenderingSuspended
Rendering should pause, such as while the window is minimized or fully occluded.
RenderingResumed(WindowMetrics)
A paused window became drawable again.
RedrawRequested(WindowMetrics)
The window can render a frame with the supplied current metrics.
CloseRequested
Native window closure requested termination of this window’s loop.
Input(InputEvent)
An ordered input transition associated with this window.
Trait Implementations§
Source§impl Clone for WindowEvent
impl Clone for WindowEvent
Source§fn clone(&self) -> WindowEvent
fn clone(&self) -> WindowEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WindowEvent
Source§impl Debug for WindowEvent
impl Debug for WindowEvent
Source§impl PartialEq for WindowEvent
impl PartialEq for WindowEvent
impl StructuralPartialEq for WindowEvent
Auto Trait Implementations§
impl Freeze for WindowEvent
impl RefUnwindSafe for WindowEvent
impl Send for WindowEvent
impl Sync for WindowEvent
impl Unpin for WindowEvent
impl UnsafeUnpin for WindowEvent
impl UnwindSafe for WindowEvent
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