Skip to main content

ToStream

Trait ToStream 

Source
pub trait ToStream<T> {
    // Required method
    fn to_stream(&self) -> impl Stream<Item = T> + Send;
}
Expand description

Allows converting a signal into an async Stream.

Required Methods§

Source

fn to_stream(&self) -> impl Stream<Item = T> + Send

Generates a Stream that emits the new value of the signal whenever it changes.

§Panics

Panics if you try to access a signal that is owned by a reactive node that has been disposed.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<S> ToStream<<S as Get>::Value> for S
where S: Clone + Get + Send + Sync + 'static, <S as Get>::Value: Send + 'static,