MultipartStreamExt

Trait MultipartStreamExt 

Source
pub trait MultipartStreamExt: Stream {
    // Provided methods
    fn collect_writer<Wr>(self, writer: Wr) -> CollectWriter<Self, Wr> 
       where Wr: MultipartWrite<Self::Item>,
             Self: Sized { ... }
    fn try_send<Wr>(self, writer: Wr) -> TrySend<Self, Wr>
       where Wr: MultipartWrite<Self::Item>,
             Self: Sized { ... }
    fn write_until<Wr, F>(self, writer: Wr, f: F) -> WriteUntil<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§

Source

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

Collects a stream by writing to a MultipartWrite, returning the result of completing the write as a future.

Source

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

Call start_send on the provided writer with the items of this stream, producing a stream of results in the return value Wr::Ret.

Source

fn write_until<Wr, F>(self, writer: Wr, f: F) -> WriteUntil<Self, Wr, F>
where Wr: MultipartWrite<Self::Item>, F: FnMut(Wr::Ret) -> bool, Self: Sized,

Sends items of this stream to the writer, yielding the completed written value as the next item in the resulting stream when the provided closure returns true.

Implementors§