pub trait MultipartStreamExt: Stream {
// Provided methods
fn assemble<Wr>(self, writer: Wr) -> Assemble<Self, Wr> ⓘ
where Wr: MultipartWrite<Self::Item>,
Self: Sized { ... }
fn assembled<Wr, F>(self, writer: Wr, f: F) -> Assembled<Self, Wr, F>
where Wr: MultipartWrite<Self::Item>,
F: FnMut(&Wr::Ret) -> bool,
Self: Sized { ... }
}Expand description
An extension trait for Streams that provides combinators to use with
MultipartWriters.
Provided Methods§
Sourcefn assemble<Wr>(self, writer: Wr) -> Assemble<Self, Wr> ⓘ
fn assemble<Wr>(self, writer: Wr) -> Assemble<Self, Wr> ⓘ
Collects a stream by writing to a MultipartWrite, returning the result
of completing the write and assembling the parts in a future.
Sourcefn assembled<Wr, F>(self, writer: Wr, f: F) -> Assembled<Self, Wr, F>
fn assembled<Wr, F>(self, writer: Wr, f: F) -> Assembled<Self, Wr, F>
Writes the items of this stream to a MultipartWrite, completing the
write when the closure returns true.
The output type of Wr must be some Option<T>. In case polling the
writer for completion produces None, the stream is ended. Otherwise,
the next item in the stream is the unwrapped T.