pub trait StreamSource {
type Item;
// Required method
fn next_item(&mut self) -> Option<Self::Item>;
}Expand description
The dyn-compatible core trait for streams.
Implement this for any type that produces a sequence of values. Unlike
Stream (which requires Self: Sized), StreamSource can be used as a
trait object (Box<dyn StreamSource<Item = T>>).
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".