pub struct DispatchResult { /* private fields */ }
Expand description
Result of event dispatch
Contains information about the success or failure of event dispatch, including any errors that occurred during listener execution.
Implementations§
Source§impl DispatchResult
impl DispatchResult
Sourcepub fn is_blocked(&self) -> bool
pub fn is_blocked(&self) -> bool
Check if the event was blocked by middleware
Sourcepub fn listener_count(&self) -> usize
pub fn listener_count(&self) -> usize
Get the total number of listeners that were called
Sourcepub fn success_count(&self) -> usize
pub fn success_count(&self) -> usize
Get the number of successful handlers
Sourcepub fn error_count(&self) -> usize
pub fn error_count(&self) -> usize
Get the number of failed handlers
Sourcepub fn errors(&self) -> Vec<&(dyn Error + Send + Sync)>
pub fn errors(&self) -> Vec<&(dyn Error + Send + Sync)>
Get all errors that occurred during dispatch
Sourcepub fn all_succeeded(&self) -> bool
pub fn all_succeeded(&self) -> bool
Check if all handlers succeeded
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
Check if any handlers failed
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DispatchResult
impl !RefUnwindSafe for DispatchResult
impl Send for DispatchResult
impl Sync for DispatchResult
impl Unpin for DispatchResult
impl !UnwindSafe for DispatchResult
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