pub struct UploadPartRequest {
pub headers: HeaderMap,
/* private fields */
}Expand description
Request to upload one multipart part.
Fields§
§headers: HeaderMapAdditional request headers. Values are signed and repeated values are preserved. Generated-name collisions are errors; signing- and transport-owned headers are rejected.
Implementations§
Source§impl UploadPartRequest
impl UploadPartRequest
Sourcepub fn new(
key: ObjectKey,
upload_id: UploadId,
part_number: PartNumber,
body: ByteStream,
) -> Self
pub fn new( key: ObjectKey, upload_id: UploadId, part_number: PartNumber, body: ByteStream, ) -> Self
Constructs an upload-part request from validated identifiers.
Sourcepub fn with_headers(self, headers: HeaderMap) -> Self
pub fn with_headers(self, headers: HeaderMap) -> Self
Replaces the request’s additional headers.
Sourcepub const fn part_number(&self) -> PartNumber
pub const fn part_number(&self) -> PartNumber
Returns the validated part number.
Sourcepub const fn body(&self) -> &ByteStream
pub const fn body(&self) -> &ByteStream
Returns the part body.
Sourcepub fn body_mut(&mut self) -> &mut ByteStream
pub fn body_mut(&mut self) -> &mut ByteStream
Returns the part body mutably.
Sourcepub fn with_checksum(self, checksum: Checksum) -> Self
pub fn with_checksum(self, checksum: Checksum) -> Self
Attaches a checksum to the request.
Sourcepub fn into_body(self) -> ByteStream
pub fn into_body(self) -> ByteStream
Consumes the request and returns its body.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for UploadPartRequest
impl !RefUnwindSafe for UploadPartRequest
impl !Sync for UploadPartRequest
impl !UnwindSafe for UploadPartRequest
impl Send for UploadPartRequest
impl Unpin for UploadPartRequest
impl UnsafeUnpin for UploadPartRequest
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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 moreCreates a shared type from an unshared type.