Skip to main content

Metadata

Struct Metadata 

Source
pub struct Metadata {
Show 20 fields pub id: Option<String>, pub self_link: Option<String>, pub name: Option<String>, pub bucket: Option<String>, pub generation: Option<i64>, pub metageneration: Option<i64>, pub content_type: Option<String>, pub content_disposition: Option<String>, pub content_encoding: Option<String>, pub time_created: Option<Timestamp>, pub updated: Option<Timestamp>, pub storage_class: Option<StorageClass>, pub time_storage_class_updated: Option<Timestamp>, pub size: Option<u64>, pub md5_hash: Option<String>, pub media_link: Option<String>, pub content_language: Option<String>, pub crc32c: Option<String>, pub etag: Option<String>, pub metadata: Option<BTreeMap<String, String>>,
}
Expand description

Metadata associated with an Object.

Fields§

§id: Option<String>

The ID of the object, including the bucket name, object name, and generation number.

§self_link: Option<String>

The link to this object.

§name: Option<String>

The name of the object. Required if not specified by URL parameter. writable

§bucket: Option<String>

The name of the bucket containing this object.

§generation: Option<i64>

The content generation of this object. Used for object versioning.

§metageneration: Option<i64>

The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.

§content_type: Option<String>

Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. writable

§content_disposition: Option<String>

Content-Disposition of the object data. writable

§content_encoding: Option<String>

Content-Encoding of the object data. writable

§time_created: Option<Timestamp>

The creation time of the object in RFC 3339 format.

§updated: Option<Timestamp>

The modification time of the object metadata in RFC 3339 format.

§storage_class: Option<StorageClass>

Storage class of the object. writable

§time_storage_class_updated: Option<Timestamp>

The time at which the object’s storage class was last changed. When the object is initially created, it will be set to timeCreated.

§size: Option<u64>

Content-Length of the data in bytes.

§md5_hash: Option<String>

MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices. writable

§media_link: Option<String>

Media download link.

§content_language: Option<String>

Content-Language of the object data. writable

§crc32c: Option<String>

CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices.

§etag: Option<String>

HTTP 1.1 Entity tag for the object.

§metadata: Option<BTreeMap<String, String>>

User-provided metadata, in key/value pairs. writable

Trait Implementations§

Source§

impl Default for Metadata

Source§

fn default() -> Metadata

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Metadata

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Metadata

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,