pub trait Stream {
type Item;
// Required method
fn poll_next(
self: Pin<&mut Self>,
context: &mut Context<'_>,
) -> Poll<Option<Self::Item>>;
}Expand description
A stream of values that arrive one at a time, asynchronously.
The one shape PrinterPort::push_events
answers in, declared here so that this port depends on nothing but the type
crate. It is the same contract as the ecosystem’s own Stream: Ready(None)
is the end, after which nothing more arrives.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".