pub trait EventType: Sized {
type Ack: AckMarker;
type Binary: BinaryMarker;
const NAME: &'static str;
}Expand description
Maps a Rust struct to a Socket.IO event name and compile-time policies.
Prefer #[derive(EventType)] over a manual implementation. The derive
generates NAME and the associated types. Add #[derive(SerializePayload)]
for emit and #[derive(DeserializePayload)] for recv.
Required Associated Constants§
Required Associated Types§
Sourcetype Binary: BinaryMarker
type Binary: BinaryMarker
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.