pub struct UserEvent {
pub name: String,
pub payload: Arc<dyn Any + Send + Sync>,
}
Expand description
A generic container for custom, application-defined events.
Fields§
§name: String
The name or type of the event, used for filtering.
payload: Arc<dyn Any + Send + Sync>
The type-erased data payload. The receiver is responsible for downcasting this to the expected concrete type.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UserEvent
impl !RefUnwindSafe for UserEvent
impl Send for UserEvent
impl Sync for UserEvent
impl Unpin for UserEvent
impl !UnwindSafe for UserEvent
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