Skip to main content

PollSourceExt

Trait PollSourceExt 

Source
pub trait PollSourceExt: UnpinPipe<In = (), Err = Exhausted> + Sized {
    // Provided methods
    fn into_stream(self) -> AsStream<Self> { ... }
    fn as_stream(&mut self) -> AsStream<&mut Self> { ... }
}
Expand description

.into_stream()/.as_stream() — lifts any exhaustible UnpinPipe source onto futures::Stream by composing AsStream (no new behavior, just the orphan-forced wrapper).

Provided Methods§

Source

fn into_stream(self) -> AsStream<Self>

Owns self, wrapping it as a futures::Stream.

Source

fn as_stream(&mut self) -> AsStream<&mut Self>

Borrows self MUTABLY as a futures::Stream, so the source can be reused once the stream handle is dropped — the same shape as Iterator::by_ref. &mut Self composes via the UnpinPipe blanket impl for &mut S below, with no wrapper reinvention.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<S: UnpinPipe<In = (), Err = Exhausted>> PollSourceExt for S