pub struct KeyArgs { /* private fields */ }Expand description
Custom request parameters for object operations.
§parmas
name: The key of object.version_id: Optional, Version-ID of the object.content_type: Optional, Content type of the object.ssec: Optional, Server-side encryption customer key.offset: Optional, Start byte position of object data.length: Optional, Number of bytes of object data from offset.metadata: Optional, user-defined metadata.extra_headers: Optional, Extra headers for advanced usage.
Note: Some parameters are only valid in specific methods
Implementations§
Source§impl KeyArgs
impl KeyArgs
pub fn new<S: Into<String>>(name: S) -> Self
Sourcepub fn version_id(self, version_id: Option<String>) -> Self
pub fn version_id(self, version_id: Option<String>) -> Self
Set version-ID of the object
Sourcepub fn content_type(self, content_type: Option<String>) -> Self
pub fn content_type(self, content_type: Option<String>) -> Self
Set content-type of the object
Sourcepub fn extra_headers(self, extra_headers: Option<HeaderMap>) -> Self
pub fn extra_headers(self, extra_headers: Option<HeaderMap>) -> Self
Set extra headers for advanced usage.
Sourcepub fn ssec(self, ssec: &SseCustomerKey) -> Self
pub fn ssec(self, ssec: &SseCustomerKey) -> Self
Set server-side encryption customer key
Sourcepub fn offset(self, offset: usize) -> Self
pub fn offset(self, offset: usize) -> Self
Set start byte position of object data when download an object.
Valid in the download operation of the object.
Default: 0
Sourcepub fn length(self, length: usize) -> Self
pub fn length(self, length: usize) -> Self
Set number of bytes of object data from offset when download an object.
If set length 0, it means to the end of the object.
Default: 0
Sourcepub fn metadata(self, metadata: HashMap<String, String>) -> Self
pub fn metadata(self, metadata: HashMap<String, String>) -> Self
Set user-defined metadata when uploading an object.
Metadata is a set of key-value pairs.
key:
- requirement is ASCII and cannot contain non-ASCII characters
- Cannot contain invisible characters and spaces
- does’t need to start with
x-amz-meta- - ignoring case
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeyArgs
impl RefUnwindSafe for KeyArgs
impl Send for KeyArgs
impl Sync for KeyArgs
impl Unpin for KeyArgs
impl UnwindSafe for KeyArgs
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