pub struct ManagedMultipartUploadRequest {
pub headers: ManagedMultipartHeaders,
/* private fields */
}Expand description
Request for a bounded, automatically cleaned-up multipart upload.
In-memory sources retain the caller’s complete byte buffer for the duration of the operation. File sources retain at most the derived in-flight part byte bound in memory; their immutable snapshot is disk-backed.
Fields§
§headers: ManagedMultipartHeadersPhase-specific additional headers. Values are signed and repeated values are preserved. Generated-name collisions are errors; signing- and transport-owned headers are rejected.
Implementations§
Source§impl ManagedMultipartUploadRequest
impl ManagedMultipartUploadRequest
Sourcepub fn from_bytes(key: ObjectKey, bytes: impl Into<Bytes>) -> Self
pub fn from_bytes(key: ObjectKey, bytes: impl Into<Bytes>) -> Self
Constructs a request with a replayable in-memory body.
Sourcepub fn from_path(key: ObjectKey, path: impl AsRef<Path>) -> Self
pub fn from_path(key: ObjectKey, path: impl AsRef<Path>) -> Self
Constructs a request with a replayable regular-file body.
The file is copied into a private disk-backed snapshot before S3 creates the multipart upload, so later changes to the source path have no effect.
Sourcepub fn with_headers(self, headers: ManagedMultipartHeaders) -> Self
pub fn with_headers(self, headers: ManagedMultipartHeaders) -> Self
Replaces the upload’s phase-specific additional headers.
Sourcepub fn with_content_type(self, content_type: impl Into<String>) -> Self
pub fn with_content_type(self, content_type: impl Into<String>) -> Self
Sets the object’s media type.
Sourcepub fn with_metadata(
self,
name: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_metadata( self, name: impl Into<String>, value: impl Into<String>, ) -> Self
Adds user-defined object metadata.
Sourcepub fn with_options(self, options: MultipartOptions) -> Self
pub fn with_options(self, options: MultipartOptions) -> Self
Applies validated resource and time bounds to this upload.
Sourcepub fn with_checksum_algorithm(
self,
algorithm: ChecksumAlgorithm,
) -> Result<Self, ChecksumCalculationError>
pub fn with_checksum_algorithm( self, algorithm: ChecksumAlgorithm, ) -> Result<Self, ChecksumCalculationError>
Calculates and sends this checksum for every uploaded part.
§Errors
Returns an error when local calculation is unavailable for the selected algorithm. SHA-1 may still be supplied through primitive multipart APIs.
Sourcepub const fn options(&self) -> MultipartOptions
pub const fn options(&self) -> MultipartOptions
Returns this upload’s resource and time bounds.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ManagedMultipartUploadRequest
impl RefUnwindSafe for ManagedMultipartUploadRequest
impl Send for ManagedMultipartUploadRequest
impl Sync for ManagedMultipartUploadRequest
impl Unpin for ManagedMultipartUploadRequest
impl UnsafeUnpin for ManagedMultipartUploadRequest
impl UnwindSafe for ManagedMultipartUploadRequest
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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