#[non_exhaustive]pub struct Metadata {
pub fingerprint: Option<Bytes>,
pub items: Vec<Items>,
pub kind: Option<String>,
/* private fields */
}Available on crate features
instance-templates or instances or machine-images or projects or region-instance-templates or region-instances only.Expand description
A metadata key/value entry.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.fingerprint: Option<Bytes>Specifies a fingerprint for this request, which is essentially a hash of the metadata’s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error412 conditionNotMet.
To see the latest fingerprint, make a get() request to retrieve the resource.
items: Vec<Items>Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
kind: Option<String>[Output Only] Type of the resource. Always compute#metadata for metadata.
Implementations§
Source§impl Metadata
impl Metadata
pub fn new() -> Self
Sourcepub fn set_fingerprint<T>(self, v: T) -> Self
pub fn set_fingerprint<T>(self, v: T) -> Self
Sets the value of fingerprint.
Sourcepub fn set_or_clear_fingerprint<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_fingerprint<T>(self, v: Option<T>) -> Self
Sets or clears the value of fingerprint.
Trait Implementations§
impl StructuralPartialEq for Metadata
Auto Trait Implementations§
impl !Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
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