Skip to main content

EventStream

Type Alias EventStream 

Source
pub type EventStream = Pin<Box<dyn Stream<Item = Result<Event>> + Send>>;
Expand description

A boxed stream of events, as a transport hands it over.

Send everywhere except wasm, where the browser APIs a transport would be built on are single-threaded and not Send at all. Requiring it there would make the wasm case — the reason this crate abstracts the transport in the first place — impossible to satisfy.

Aliased Type§

pub struct EventStream { /* private fields */ }