pub struct DefaultEventDispatcher { /* private fields */ }Expand description
Default implementation of EventDispatcher
Routes events to matching hooks in the registry and executes them using the executor. Implements hook isolation: if one hook fails, other hooks continue executing.
Implementations§
Source§impl DefaultEventDispatcher
impl DefaultEventDispatcher
Sourcepub fn new(
registry: Arc<dyn HookRegistry>,
executor: Arc<dyn HookExecutor>,
) -> Self
pub fn new( registry: Arc<dyn HookRegistry>, executor: Arc<dyn HookExecutor>, ) -> Self
Create a new event dispatcher
§Arguments
registry- Hook registry for querying hooksexecutor- Hook executor for executing hooks
Trait Implementations§
Source§impl Clone for DefaultEventDispatcher
impl Clone for DefaultEventDispatcher
Source§fn clone(&self) -> DefaultEventDispatcher
fn clone(&self) -> DefaultEventDispatcher
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 DefaultEventDispatcher
impl !RefUnwindSafe for DefaultEventDispatcher
impl Send for DefaultEventDispatcher
impl Sync for DefaultEventDispatcher
impl Unpin for DefaultEventDispatcher
impl !UnwindSafe for DefaultEventDispatcher
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