Skip to main content

Stream

Trait Stream 

Source
pub trait Stream<'d>: Sized {
    type Item;

    // Required method
    fn poll_next(call: PollCall<'_, '_, 'd, Self>) -> Poll<Option<Self::Item>>;

    // Provided method
    fn is_final(&self) -> bool { ... }
}
Expand description

A pinned sequence whose owner stops polling after Ready(None). Each admitted call yields at most one item; Task drops the child at end.

Required Associated Types§

Required Methods§

Source

fn poll_next(call: PollCall<'_, '_, 'd, Self>) -> Poll<Option<Self::Item>>

Provided Methods§

Source

fn is_final(&self) -> bool

True after an item if the next poll would immediately return Ready(None) without effects.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§