pub unsafe trait Payload: Sized + 'static {
// Required method
unsafe fn read(raw: *const c_void) -> Option<Self>;
}Expand description
The payload of an event, read from the publisher’s pointer during the handler.
§Safety
read must accept exactly the payloads its events publish, and null (an
event published without a payload, as Host::publish does), for which
it reads nothing.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".