pub struct PutObjectRequest {
pub key: ObjectKey,
pub body: ByteStream,
pub content_type: Option<String>,
pub user_metadata: BTreeMap<String, String>,
pub conditions: Conditions,
pub checksum_algorithm: Option<ChecksumAlgorithm>,
pub headers: HeaderMap,
}Expand description
Request to upload one object.
Fields§
§key: ObjectKeyDestination object key.
body: ByteStreamUpload body. Replayability is determined by its selected source.
content_type: Option<String>Optional media type.
user_metadata: BTreeMap<String, String>Caller-defined object metadata.
conditions: ConditionsPreconditions for the write.
checksum_algorithm: Option<ChecksumAlgorithm>Ask S3 to calculate or validate this checksum algorithm.
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 PutObjectRequest
impl PutObjectRequest
Sourcepub fn new(key: ObjectKey, body: ByteStream) -> Self
pub fn new(key: ObjectKey, body: ByteStream) -> Self
Constructs a request with no optional headers.
Sourcepub fn with_headers(self, headers: HeaderMap) -> Self
pub fn with_headers(self, headers: HeaderMap) -> Self
Replaces the request’s additional headers.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for PutObjectRequest
impl !RefUnwindSafe for PutObjectRequest
impl !Sync for PutObjectRequest
impl !UnwindSafe for PutObjectRequest
impl Send for PutObjectRequest
impl Unpin for PutObjectRequest
impl UnsafeUnpin for PutObjectRequest
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.