pub struct EventMetadata {
pub event_name: &'static str,
pub type_id: TypeId,
pub last_dispatch: Instant,
pub dispatch_count: usize,
pub listener_count: usize,
}
Expand description
Event metadata for debugging and monitoring
Contains information about event dispatch history and performance.
Fields§
§event_name: &'static str
The name of the event type
type_id: TypeId
Type ID of the event
last_dispatch: Instant
Timestamp of the last dispatch
dispatch_count: usize
Total number of times this event has been dispatched
listener_count: usize
Number of listeners currently subscribed to this event
Implementations§
Source§impl EventMetadata
impl EventMetadata
Sourcepub fn time_since_last_dispatch(&self) -> Duration
pub fn time_since_last_dispatch(&self) -> Duration
Get the time since the last dispatch
Trait Implementations§
Source§impl Clone for EventMetadata
impl Clone for EventMetadata
Source§fn clone(&self) -> EventMetadata
fn clone(&self) -> EventMetadata
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 EventMetadata
impl RefUnwindSafe for EventMetadata
impl Send for EventMetadata
impl Sync for EventMetadata
impl Unpin for EventMetadata
impl UnwindSafe for EventMetadata
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