pub struct EventBus;Expand description
Scope-aware typed cross-component custom event bus supporting automatic cleanup on unmount and freeze/resume coalescing.
Implementations§
Source§impl EventBus
Typed cross-component event emission and scoped subscription for EventBus.
impl EventBus
Typed cross-component event emission and scoped subscription for EventBus.
Sourcepub fn emit<ErrorType>(event: ErrorType)where
ErrorType: CustomEvent,
pub fn emit<ErrorType>(event: ErrorType)where
ErrorType: CustomEvent,
Emits a typed custom event E to all active cross-component listeners (frozen listeners coalesce until resumed).
§Arguments
ErrorType- Custom event payload implementingCustomEvent.
Trait Implementations§
impl Copy for EventBus
impl Eq for EventBus
impl StructuralPartialEq for EventBus
Auto Trait Implementations§
impl Forget for EventBus
impl Freeze for EventBus
impl Move for EventBus
impl RefUnwindSafe for EventBus
impl Send for EventBus
impl Sync for EventBus
impl Unpin for EventBus
impl UnsafeUnpin for EventBus
impl UnwindSafe for EventBus
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