#[non_exhaustive]pub struct VolumeSnapshot {
pub name: String,
pub id: String,
pub description: String,
pub create_time: Option<Timestamp>,
pub storage_volume: String,
pub type: SnapshotType,
/* private fields */
}Expand description
A snapshot of a volume. Only boot volumes can have snapshots.
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.name: StringThe name of the snapshot.
id: StringOutput only. An identifier for the snapshot, generated by the backend.
description: StringThe description of the snapshot.
create_time: Option<Timestamp>Output only. The creation time of the snapshot.
storage_volume: StringOutput only. The name of the volume which this snapshot belongs to.
type: SnapshotTypeOutput only. The type of the snapshot which indicates whether it was scheduled or manual/ad-hoc.
Implementations§
Source§impl VolumeSnapshot
impl VolumeSnapshot
pub fn new() -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
ⓘ
use wkt::Timestamp;
let x = VolumeSnapshot::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
ⓘ
use wkt::Timestamp;
let x = VolumeSnapshot::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = VolumeSnapshot::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_storage_volume<T: Into<String>>(self, v: T) -> Self
pub fn set_storage_volume<T: Into<String>>(self, v: T) -> Self
Sets the value of storage_volume.
§Example
ⓘ
let x = VolumeSnapshot::new().set_storage_volume("example");Sourcepub fn set_type<T: Into<SnapshotType>>(self, v: T) -> Self
pub fn set_type<T: Into<SnapshotType>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for VolumeSnapshot
impl Clone for VolumeSnapshot
Source§fn clone(&self) -> VolumeSnapshot
fn clone(&self) -> VolumeSnapshot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VolumeSnapshot
impl Debug for VolumeSnapshot
Source§impl Default for VolumeSnapshot
impl Default for VolumeSnapshot
Source§fn default() -> VolumeSnapshot
fn default() -> VolumeSnapshot
Returns the “default value” for a type. Read more
Source§impl Message for VolumeSnapshot
impl Message for VolumeSnapshot
Source§impl PartialEq for VolumeSnapshot
impl PartialEq for VolumeSnapshot
impl StructuralPartialEq for VolumeSnapshot
Auto Trait Implementations§
impl Freeze for VolumeSnapshot
impl RefUnwindSafe for VolumeSnapshot
impl Send for VolumeSnapshot
impl Sync for VolumeSnapshot
impl Unpin for VolumeSnapshot
impl UnwindSafe for VolumeSnapshot
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