pub trait EventHandler<E> {
type Publish: Publisher<E>;
// Required method
fn init() -> (Self::Publish, Self);
}Expand description
Constructs the read side of an event stream, paired with its Publisher
write end. A producer holds impl EventHandler so it can both emit (through
Publish) and hand out subscriptions (through the handler itself), with no
bound on the event type. Send + Sync is required by the sharer (a
cross-thread producer), not here.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".