pub trait IoStreamExt: IoStream {
// Provided method
fn expect_next<Item: Deserialize>(&mut self) -> ExpectNext<'_, Self, Item> ⓘ
where Self: Unpin { ... }
}Expand description
An extension trait for IoStream which provides a variety of convenient
functions.
Provided Methods§
Sourcefn expect_next<Item: Deserialize>(&mut self) -> ExpectNext<'_, Self, Item> ⓘwhere
Self: Unpin,
fn expect_next<Item: Deserialize>(&mut self) -> ExpectNext<'_, Self, Item> ⓘwhere
Self: Unpin,
Creates a future that resolves to the next item in the stream, returning an error if the stream is exhausted.
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.