pub enum Priority {
High = 0,
Normal = 1,
Low = 2,
}Expand description
Priority levels for events in the queue
Lower numeric values indicate higher priority. Events are processed in priority order, with high priority events processed before normal and low priority events.
Variants§
High = 0
High priority for critical events (Quit, Key events, Suspend/Resume)
Normal = 1
Normal priority for user interactions (Mouse, User messages, Paste)
Low = 2
Low priority for background events (Tick, Resize, Focus/Blur)
Implementations§
Source§impl Priority
impl Priority
Sourcepub fn from_event<M: Message>(event: &Event<M>) -> Self
pub fn from_event<M: Message>(event: &Event<M>) -> Self
Determine the priority level for a given event
This method automatically assigns priority levels based on event type:
- High: Quit, Key events, Suspend/Resume, Process execution
- Normal: Mouse events, User messages, Paste events
- Low: Tick, Resize, Focus/Blur events
Trait Implementations§
Source§impl Ord for Priority
impl Ord for Priority
Source§impl PartialOrd for Priority
impl PartialOrd for Priority
impl Copy for Priority
impl Eq for Priority
impl StructuralPartialEq for Priority
Auto Trait Implementations§
impl Freeze for Priority
impl RefUnwindSafe for Priority
impl Send for Priority
impl Sync for Priority
impl Unpin for Priority
impl UnwindSafe for Priority
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> Inspectable for T
impl<T> Inspectable for T
Source§fn inspect_if(self, condition: bool, label: &str) -> Selfwhere
Self: Debug,
fn inspect_if(self, condition: bool, label: &str) -> Selfwhere
Self: Debug,
Conditionally inspect this value
Source§fn inspect_with<F>(self, label: &str, f: F) -> Self
fn inspect_with<F>(self, label: &str, f: F) -> Self
Inspect with a custom formatter