Skip to main content

MultipartWriter

Trait MultipartWriter 

Source
pub trait MultipartWriter: Send {
    // Required methods
    fn write_chunk(&mut self, data: Bytes) -> BoxFuture<'_, Result<()>>;
    fn complete(self: Box<Self>) -> BoxFuture<'static, Result<()>>;
}
Expand description

Streaming writer used to build up a file in chunks.

Obtained from Storage::write_multipart. Callers push successive chunks via write_chunk and finalize with complete; dropping the writer without calling complete aborts the upload.

Required Methods§

Source

fn write_chunk(&mut self, data: Bytes) -> BoxFuture<'_, Result<()>>

Appends data to the in-flight upload.

Source

fn complete(self: Box<Self>) -> BoxFuture<'static, Result<()>>

Finalizes the upload, committing all previously written chunks.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§