Struct transform_stream::AsyncStream
source · pub struct AsyncStream<T, G> { /* private fields */ }
Expand description
Asynchronous stream of items
Implementations§
source§impl<T, G> AsyncStream<T, G>
impl<T, G> AsyncStream<T, G>
sourcepub fn new<F>(f: F) -> Selfwhere
F: FnOnce(Yielder<T>) -> G,
pub fn new<F>(f: F) -> Selfwhere
F: FnOnce(Yielder<T>) -> G,
Constructs an AsyncStream
by a factory function which returns a future.
Trait Implementations§
source§impl<T, G> FusedStream for AsyncStream<T, G>where
G: Future<Output = ()>,
impl<T, G> FusedStream for AsyncStream<T, G>where
G: Future<Output = ()>,
source§fn is_terminated(&self) -> bool
fn is_terminated(&self) -> bool
Returns
true
if the stream should no longer be polled.