#[non_exhaustive]pub struct PutMetadata {
pub content_disposition: Option<String>,
pub content_encoding: Option<String>,
pub content_language: Option<String>,
pub content_type: Option<String>,
pub cache_control: Option<String>,
pub custom_time: Option<String>,
pub custom_metadata: HashMap<String, String>,
/* private fields */
}Expand description
Describes options for object metadata update.
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.content_disposition: Option<String>Optional. Updates objects Content-Disposition fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Refer https://cloud.google.com/storage/docs/metadata#content-disposition for additional documentation.
content_encoding: Option<String>Optional. Updates objects Content-Encoding fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Refer to documentation in https://cloud.google.com/storage/docs/metadata#content-encoding.
content_language: Option<String>Optional. Updates objects Content-Language fixed metadata. Refer to ISO 639-1 language codes for typical values of this metadata. Max length 100 characters. Unset values will be ignored. Set empty values to clear the metadata. Refer to documentation in https://cloud.google.com/storage/docs/metadata#content-language.
content_type: Option<String>Optional. Updates objects Content-Type fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Refer to documentation in https://cloud.google.com/storage/docs/metadata#content-type
cache_control: Option<String>Optional. Updates objects Cache-Control fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Additionally, the value for Custom-Time cannot decrease. Refer to documentation in https://cloud.google.com/storage/docs/metadata#caching_data.
custom_time: Option<String>Optional. Updates objects Custom-Time fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Refer to documentation in https://cloud.google.com/storage/docs/metadata#custom-time.
custom_metadata: HashMap<String, String>Optional. Updates objects custom metadata. Adds or sets individual custom metadata key value pairs on objects. Keys that are set with empty custom metadata values will have its value cleared. Existing custom metadata not specified with this flag is not changed. Refer to documentation in https://cloud.google.com/storage/docs/metadata#custom-metadata
Implementations§
Source§impl PutMetadata
impl PutMetadata
pub fn new() -> Self
Sourcepub fn set_content_disposition<T>(self, v: T) -> Self
pub fn set_content_disposition<T>(self, v: T) -> Self
Sets the value of content_disposition.
§Example
let x = PutMetadata::new().set_content_disposition("example");Sourcepub fn set_or_clear_content_disposition<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_content_disposition<T>(self, v: Option<T>) -> Self
Sets or clears the value of content_disposition.
§Example
let x = PutMetadata::new().set_or_clear_content_disposition(Some("example"));
let x = PutMetadata::new().set_or_clear_content_disposition(None::<String>);Sourcepub fn set_content_encoding<T>(self, v: T) -> Self
pub fn set_content_encoding<T>(self, v: T) -> Self
Sets the value of content_encoding.
§Example
let x = PutMetadata::new().set_content_encoding("example");Sourcepub fn set_or_clear_content_encoding<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_content_encoding<T>(self, v: Option<T>) -> Self
Sets or clears the value of content_encoding.
§Example
let x = PutMetadata::new().set_or_clear_content_encoding(Some("example"));
let x = PutMetadata::new().set_or_clear_content_encoding(None::<String>);Sourcepub fn set_content_language<T>(self, v: T) -> Self
pub fn set_content_language<T>(self, v: T) -> Self
Sets the value of content_language.
§Example
let x = PutMetadata::new().set_content_language("example");Sourcepub fn set_or_clear_content_language<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_content_language<T>(self, v: Option<T>) -> Self
Sets or clears the value of content_language.
§Example
let x = PutMetadata::new().set_or_clear_content_language(Some("example"));
let x = PutMetadata::new().set_or_clear_content_language(None::<String>);Sourcepub fn set_content_type<T>(self, v: T) -> Self
pub fn set_content_type<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_content_type<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_content_type<T>(self, v: Option<T>) -> Self
Sets or clears the value of content_type.
§Example
let x = PutMetadata::new().set_or_clear_content_type(Some("example"));
let x = PutMetadata::new().set_or_clear_content_type(None::<String>);Sourcepub fn set_cache_control<T>(self, v: T) -> Self
pub fn set_cache_control<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_cache_control<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_cache_control<T>(self, v: Option<T>) -> Self
Sets or clears the value of cache_control.
§Example
let x = PutMetadata::new().set_or_clear_cache_control(Some("example"));
let x = PutMetadata::new().set_or_clear_cache_control(None::<String>);Sourcepub fn set_custom_time<T>(self, v: T) -> Self
pub fn set_custom_time<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_custom_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_custom_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of custom_time.
§Example
let x = PutMetadata::new().set_or_clear_custom_time(Some("example"));
let x = PutMetadata::new().set_or_clear_custom_time(None::<String>);Sourcepub fn set_custom_metadata<T, K, V>(self, v: T) -> Self
pub fn set_custom_metadata<T, K, V>(self, v: T) -> Self
Sets the value of custom_metadata.
§Example
let x = PutMetadata::new().set_custom_metadata([
("key0", "abc"),
("key1", "xyz"),
]);Trait Implementations§
Source§impl Clone for PutMetadata
impl Clone for PutMetadata
Source§fn clone(&self) -> PutMetadata
fn clone(&self) -> PutMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more