UploadStreamExt

Trait UploadStreamExt 

Source
pub trait UploadStreamExt: Stream {
    // Provided methods
    fn collect_upload<U>(self, uploader: U) -> CollectUpload<Self, U>
       where Self: Sized,
             U: FusedMultipartWrite<Self::Item, Error = UploadError, Output = CompletedUpload> { ... }
    fn into_upload<U>(
        self,
        uploader: U,
    ) -> IntoUpload<Self, U, fn(&Status) -> bool>
       where Self: Sized,
             U: FusedMultipartWrite<Self::Item, Ret = Status, Error = UploadError, Output = CompletedUpload> { ... }
    fn into_upload_when<U, F>(self, uploader: U, f: F) -> IntoUpload<Self, U, F>
       where Self: Sized,
             U: FusedMultipartWrite<Self::Item, Error = UploadError, Output = CompletedUpload>,
             F: FnMut(&U::Ret) -> bool { ... }
}
Expand description

Extension of Stream by methods for uploading it.

Provided Methods§

Source

fn collect_upload<U>(self, uploader: U) -> CollectUpload<Self, U>
where Self: Sized, U: FusedMultipartWrite<Self::Item, Error = UploadError, Output = CompletedUpload>,

Collect this stream into a multipart upload, returning the result of completing the upload in a future.

Source

fn into_upload<U>(self, uploader: U) -> IntoUpload<Self, U, fn(&Status) -> bool>
where Self: Sized, U: FusedMultipartWrite<Self::Item, Ret = Status, Error = UploadError, Output = CompletedUpload>,

Transform the input stream by writing its items to the uploader U, producing the next item in the stream by completing the upload when the status indicates the upload is complete.

The resulting stream ends when either the input stream is exhausted or the uploader is unable to start the next upload after producing an item.

Source

fn into_upload_when<U, F>(self, uploader: U, f: F) -> IntoUpload<Self, U, F>
where Self: Sized, U: FusedMultipartWrite<Self::Item, Error = UploadError, Output = CompletedUpload>, F: FnMut(&U::Ret) -> bool,

Transform the input stream by writing its items to the uploader U, producing the next item in the stream by completing the upload when the given closure returns true.

Implementors§