Trait leptos::SignalStream

source ·
pub trait SignalStream<T> {
    // Required method
    fn to_stream(
        &self,
        cx: Scope
    ) -> Pin<Box<dyn Stream<Item = T> + 'static, Global>>;
}
Expand description

This trait allows converting a signal into a async Stream.

Required Methods§

source

fn to_stream( &self, cx: Scope ) -> Pin<Box<dyn Stream<Item = T> + 'static, Global>>

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

Panics

Panics if you try to access a signal that was created in a Scope that has been disposed.

Implementors§

source§

impl<T> SignalStream<T> for MaybeSignal<T>where T: Clone,

source§

impl<T> SignalStream<T> for Memo<T>where T: Clone,

source§

impl<T> SignalStream<T> for ReadSignal<T>where T: Clone,

source§

impl<T> SignalStream<T> for RwSignal<T>where T: Clone,

source§

impl<T> SignalStream<T> for Signal<T>where T: Clone,