pub trait LendingStream {
type Item<'a>
where Self: 'a;
// Required method
fn poll_next(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Option<Self::Item<'_>>>;
// Provided methods
fn size_hint(&self) -> (usize, Option<usize>) { ... }
fn next(&mut self) -> Next<'_, Self> ⓘ
where Self: Unpin { ... }
}
Expand description
An interface for dealing with iterators which borrow from Self
Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.