MultipartStreamExt

Trait MultipartStreamExt 

Source
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: FusedMultipartWrite<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§

Source

fn assemble<Wr>(self, writer: Wr) -> Assemble<Self, Wr>
where Wr: MultipartWrite<Self::Item>, Self: Sized,

Collects a stream by writing to a MultipartWrite, returning the result of completing the write and assembling the parts in a future.

Source

fn assembled<Wr, F>(self, writer: Wr, f: F) -> Assembled<Self, Wr, F>
where Wr: FusedMultipartWrite<Self::Item>, F: FnMut(&Wr::Ret) -> bool, Self: Sized,

Writes the items of this stream to a MultipartWrite, completing the write when the closure returns true.

The result is a stream of the results of polling the writer to completion. If the inner writer becomes fused after producing an item, the stream is ended early.

Implementors§