pub trait FromStream<T> {
// Required methods
fn from_stream(stream: impl Stream<Item = T> + Send + 'static) -> Self;
fn from_stream_unsync(stream: impl Stream<Item = T> + 'static) -> Self;
}Expand description
Allows creating a signal from an async Stream.
Required Methods§
Sourcefn from_stream(stream: impl Stream<Item = T> + Send + 'static) -> Self
fn from_stream(stream: impl Stream<Item = T> + Send + 'static) -> Self
Creates a signal that contains the latest value of the stream.
Sourcefn from_stream_unsync(stream: impl Stream<Item = T> + 'static) -> Self
fn from_stream_unsync(stream: impl Stream<Item = T> + 'static) -> Self
Creates a signal that contains the latest value of the stream.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".