Trait ToStream

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§

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", so this trait is not object safe.

Implementors§

§

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