pub trait Stream {
    type Item;

    // Required method
    fn poll_next(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>
    ) -> Poll<Option<Self::Item>>;

    // Provided method
    fn next(&mut self) -> Next<'_, Self> 
       where Self: Unpin { ... }
}

Required Associated Types§

type Item

Required Methods§

fn poll_next( self: Pin<&mut Self>, cx: &mut Context<'_> ) -> Poll<Option<Self::Item>>

Provided Methods§

fn next(&mut self) -> Next<'_, Self> where Self: Unpin,

Implementors§

§

impl<T> Stream for UnboundedReceiver<T>

§

type Item = T