Enum hexavalent::hook::Priority
source · #[non_exhaustive]pub enum Priority {
Lowest = -128,
Low = -64,
Normal = 0,
High = 64,
Highest = 127,
}
Expand description
Determines the order in which hook callbacks are called.
Used with hook registration functions such as PluginHandle::hook_command
.
Unless you need to intercept events in a certain order, use Priority::Normal
.
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.
Lowest = -128
Callbacks with the lowest priority run after callbacks with any other priority.
Analogous to HEXCHAT_PRI_LOWEST
.
Low = -64
Analogous to HEXCHAT_PRI_LOW
.
Normal = 0
Most callbacks should use normal priority.
Analogous to HEXCHAT_PRI_NORM
.
High = 64
Analogous to HEXCHAT_PRI_HIGH
.
Highest = 127
Callbacks with the highest priority run before callbacks with any other priority.
Analogous to HEXCHAT_PRI_HIGHEST
.
Trait Implementations§
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