pub trait Stream: When {
fn listen<E: FromWasmAbi + 'static>(
self: &Rc<Self>,
event_type: &'static str
) -> Result<EventStream<Self, E>, JsError>;
}Expand description
Trait for creating event streams.
Required Methods
sourcefn listen<E: FromWasmAbi + 'static>(
self: &Rc<Self>,
event_type: &'static str
) -> Result<EventStream<Self, E>, JsError>
fn listen<E: FromWasmAbi + 'static>(
self: &Rc<Self>,
event_type: &'static str
) -> Result<EventStream<Self, E>, JsError>
Create stream of given event type.