pub trait StreamReader: Stream<Item = StreamResult<Self::Output>> {
type Output;
type Info;
// Required methods
fn info(&self) -> &Self::Info;
fn progress(&self) -> impl Stream<Item = StreamProgress>;
fn read_all(self) -> impl Future<Output = StreamResult<Self::Output>> + Send;
}Expand description
Reader for an incoming data stream.
The stream being read from is kept open as long as its reader exists; dropping the reader will close the stream.
Required Associated Types§
Required Methods§
Sourcefn progress(&self) -> impl Stream<Item = StreamProgress>
fn progress(&self) -> impl Stream<Item = StreamProgress>
Returns a stream of StreamProgress events as the stream is incrementally received from
the sender participant.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".