pub struct MultipartUpload { /* private fields */ }Expand description
Represents an ongoing Multipart Upload, tied to a specific Session and UploadId.
Create a Multipart Upload handle using Session::initiate_multipart_upload or Session::resume_multipart_upload.
Implementations§
Source§impl MultipartUpload
impl MultipartUpload
Sourcepub async fn put(
&self,
body: impl Into<Bytes>,
part_number: u32,
content_md5: Option<&[u8; 16]>,
) -> Result<CompletePart>
pub async fn put( &self, body: impl Into<Bytes>, part_number: u32, content_md5: Option<&[u8; 16]>, ) -> Result<CompletePart>
Uploads a part using a [Bytes]-like payload.
IMPORTANT: unlike single-object uploads, the client does not automatically compress
contents based on this upload’s Metadata::compression.
The caller is responsible to compress the payload in accordance with the compression,
and, optionally, to pass the content_md5 of the compressed payload.
Sourcepub async fn put_stream(
&self,
stream: ClientStream,
part_number: u32,
content_length: u64,
content_md5: Option<&[u8; 16]>,
) -> Result<CompletePart>
pub async fn put_stream( &self, stream: ClientStream, part_number: u32, content_length: u64, content_md5: Option<&[u8; 16]>, ) -> Result<CompletePart>
Uploads a part using a streaming payload.
IMPORTANT: unlike single-object uploads, the client does not automatically compress
contents based on this upload’s Metadata::compression.
The caller is responsible to compress the payload in accordance with the compression,
and to pass the content_length and, optionally, content_md5 of the compressed payload.
Sourcepub async fn put_read<R>(
&self,
reader: R,
part_number: u32,
content_length: u64,
content_md5: Option<&[u8; 16]>,
) -> Result<CompletePart>
pub async fn put_read<R>( &self, reader: R, part_number: u32, content_length: u64, content_md5: Option<&[u8; 16]>, ) -> Result<CompletePart>
Uploads a part from an [AsyncRead] source.
IMPORTANT: unlike single-object uploads, the client does not automatically compress
contents based on this upload’s Metadata::compression.
The caller is responsible to compress the payload in accordance with the compression,
and to pass the content_length and, optionally, content_md5 of the compressed payload.
Sourcepub async fn list_parts(&self) -> Result<Vec<PartInfo>>
pub async fn list_parts(&self) -> Result<Vec<PartInfo>>
Lists all parts that have been uploaded for this multipart upload.
Sourcepub async fn complete(
self,
parts: impl IntoIterator<Item = CompletePart>,
) -> Result<ObjectKey>
pub async fn complete( self, parts: impl IntoIterator<Item = CompletePart>, ) -> Result<ObjectKey>
Completes the multipart upload, assembling all parts into the final object.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MultipartUpload
impl !RefUnwindSafe for MultipartUpload
impl Send for MultipartUpload
impl Sync for MultipartUpload
impl Unpin for MultipartUpload
impl UnsafeUnpin for MultipartUpload
impl !UnwindSafe for MultipartUpload
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more