pub struct EventHandlerRegistration {
pub event_type: &'static str,
pub priority: u32,
pub description: &'static str,
pub once: bool,
pub target_component: Option<&'static str>,
pub depends_on: &'static [&'static str],
pub flags: RegistrationFlags,
}Expand description
Event handler registration descriptor.
Linux equivalent: Like struct notifier_block - declares event subscription.
Priority convention (from EventBus):
- 0-50: Core handlers (kernel-level)
- 100: Default plugin priority
- 200+: Cleanup/late handlers
Fields§
§event_type: &'static strEvent type name (e.g., BufferChanged, CursorMoved).
priority: u32Handler priority (lower = called earlier).
description: &'static strDescription for debugging/introspection.
once: boolWhether handler auto-unsubscribes after one event (one-shot).
target_component: Option<&'static str>Optional target component ID for scoped events.
depends_on: &'static [&'static str]Dependencies on other handlers or modules.
flags: RegistrationFlagsRegistration flags.
Implementations§
Source§impl EventHandlerRegistration
impl EventHandlerRegistration
Sourcepub const fn with_priority(self, priority: u32) -> Self
pub const fn with_priority(self, priority: u32) -> Self
Set priority.
Sourcepub const fn with_description(self, desc: &'static str) -> Self
pub const fn with_description(self, desc: &'static str) -> Self
Set description.
Sourcepub const fn with_target(self, component: &'static str) -> Self
pub const fn with_target(self, component: &'static str) -> Self
Set target component.
Sourcepub const fn with_depends_on(self, deps: &'static [&'static str]) -> Self
pub const fn with_depends_on(self, deps: &'static [&'static str]) -> Self
Set dependencies.
Sourcepub const fn with_flags(self, flags: RegistrationFlags) -> Self
pub const fn with_flags(self, flags: RegistrationFlags) -> Self
Set registration flags.
Sourcepub const fn core_priority(self, priority: u32) -> Self
pub const fn core_priority(self, priority: u32) -> Self
Set core priority (clamped to 0-50 range).
Trait Implementations§
Source§impl Clone for EventHandlerRegistration
impl Clone for EventHandlerRegistration
Source§fn clone(&self) -> EventHandlerRegistration
fn clone(&self) -> EventHandlerRegistration
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EventHandlerRegistration
impl RefUnwindSafe for EventHandlerRegistration
impl Send for EventHandlerRegistration
impl Sync for EventHandlerRegistration
impl Unpin for EventHandlerRegistration
impl UnsafeUnpin for EventHandlerRegistration
impl UnwindSafe for EventHandlerRegistration
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