Struct aws_sdk_s3::types::Object
source · #[non_exhaustive]pub struct Object {
pub key: Option<String>,
pub last_modified: Option<DateTime>,
pub e_tag: Option<String>,
pub checksum_algorithm: Option<Vec<ChecksumAlgorithm>>,
pub size: Option<i64>,
pub storage_class: Option<ObjectStorageClass>,
pub owner: Option<Owner>,
pub restore_status: Option<RestoreStatus>,
}
Expand description
An object consists of data and its descriptive metadata.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.key: Option<String>
The name that you assign to an object. You use the object key to retrieve the object.
last_modified: Option<DateTime>
Creation date of the object.
e_tag: Option<String>
The entity tag is a hash of the object. The ETag reflects changes only to the contents of an object, not its metadata. The ETag may or may not be an MD5 digest of the object data. Whether or not it is depends on how the object was created and how it is encrypted as described below:
-
Objects created by the PUT Object, POST Object, or Copy operation, or through the Amazon Web Services Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that are an MD5 digest of their object data.
-
Objects created by the PUT Object, POST Object, or Copy operation, or through the Amazon Web Services Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are not an MD5 digest of their object data.
-
If an object is created by either the Multipart Upload or Part Copy operation, the ETag is not an MD5 digest, regardless of the method of encryption. If an object is larger than 16 MB, the Amazon Web Services Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest.
Directory buckets - MD5 is not supported by directory buckets.
checksum_algorithm: Option<Vec<ChecksumAlgorithm>>
The algorithm that was used to create a checksum of the object.
size: Option<i64>
Size in bytes of the object
storage_class: Option<ObjectStorageClass>
The class of storage used to store the object.
Directory buckets - Only the S3 Express One Zone storage class is supported by directory buckets to store objects.
owner: Option<Owner>
The owner of the object
Directory buckets - The bucket owner is returned as the object owner.
restore_status: Option<RestoreStatus>
Specifies the restoration status of an object. Objects in certain storage classes must be restored before they can be retrieved. For more information about these storage classes and how to work with archived objects, see Working with archived objects in the Amazon S3 User Guide.
This functionality is not supported for directory buckets. Only the S3 Express One Zone storage class is supported by directory buckets to store objects.
Implementations§
source§impl Object
impl Object
sourcepub fn key(&self) -> Option<&str>
pub fn key(&self) -> Option<&str>
The name that you assign to an object. You use the object key to retrieve the object.
sourcepub fn last_modified(&self) -> Option<&DateTime>
pub fn last_modified(&self) -> Option<&DateTime>
Creation date of the object.
sourcepub fn e_tag(&self) -> Option<&str>
pub fn e_tag(&self) -> Option<&str>
The entity tag is a hash of the object. The ETag reflects changes only to the contents of an object, not its metadata. The ETag may or may not be an MD5 digest of the object data. Whether or not it is depends on how the object was created and how it is encrypted as described below:
-
Objects created by the PUT Object, POST Object, or Copy operation, or through the Amazon Web Services Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that are an MD5 digest of their object data.
-
Objects created by the PUT Object, POST Object, or Copy operation, or through the Amazon Web Services Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are not an MD5 digest of their object data.
-
If an object is created by either the Multipart Upload or Part Copy operation, the ETag is not an MD5 digest, regardless of the method of encryption. If an object is larger than 16 MB, the Amazon Web Services Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest.
Directory buckets - MD5 is not supported by directory buckets.
sourcepub fn checksum_algorithm(&self) -> &[ChecksumAlgorithm]
pub fn checksum_algorithm(&self) -> &[ChecksumAlgorithm]
The algorithm that was used to create a checksum of the object.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .checksum_algorithm.is_none()
.
sourcepub fn storage_class(&self) -> Option<&ObjectStorageClass>
pub fn storage_class(&self) -> Option<&ObjectStorageClass>
The class of storage used to store the object.
Directory buckets - Only the S3 Express One Zone storage class is supported by directory buckets to store objects.
sourcepub fn owner(&self) -> Option<&Owner>
pub fn owner(&self) -> Option<&Owner>
The owner of the object
Directory buckets - The bucket owner is returned as the object owner.
sourcepub fn restore_status(&self) -> Option<&RestoreStatus>
pub fn restore_status(&self) -> Option<&RestoreStatus>
Specifies the restoration status of an object. Objects in certain storage classes must be restored before they can be retrieved. For more information about these storage classes and how to work with archived objects, see Working with archived objects in the Amazon S3 User Guide.
This functionality is not supported for directory buckets. Only the S3 Express One Zone storage class is supported by directory buckets to store objects.
Trait Implementations§
impl StructuralPartialEq for Object
Auto Trait Implementations§
impl Freeze for Object
impl RefUnwindSafe for Object
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnwindSafe for Object
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)