Skip to main content

Stream

Trait Stream 

Source
pub trait Stream: When {
    // Required method
    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§

Source

fn listen<E: FromWasmAbi + 'static>( self: &Rc<Self>, event_type: &'static str, ) -> Result<EventStream<Self, E>, JsError>

Create stream of given event type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> Stream for T
where T: When,