#[non_exhaustive]pub struct PersistentDiskSpec {
pub disk_type: String,
pub disk_size_gb: i64,
/* private fields */
}Expand description
Represents the spec of [persistent disk][https://cloud.google.com/compute/docs/disks/persistent-disks] options.
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.disk_type: StringType of the disk (default is “pd-standard”). Valid values: “pd-ssd” (Persistent Disk Solid State Drive) “pd-standard” (Persistent Disk Hard Disk Drive) “pd-balanced” (Balanced Persistent Disk) “pd-extreme” (Extreme Persistent Disk)
disk_size_gb: i64Size in GB of the disk (default is 100GB).
Implementations§
Source§impl PersistentDiskSpec
impl PersistentDiskSpec
pub fn new() -> Self
Sourcepub fn set_disk_type<T: Into<String>>(self, v: T) -> Self
pub fn set_disk_type<T: Into<String>>(self, v: T) -> Self
Sets the value of disk_type.
Sourcepub fn set_disk_size_gb<T: Into<i64>>(self, v: T) -> Self
pub fn set_disk_size_gb<T: Into<i64>>(self, v: T) -> Self
Sets the value of disk_size_gb.
Trait Implementations§
Source§impl Clone for PersistentDiskSpec
impl Clone for PersistentDiskSpec
Source§fn clone(&self) -> PersistentDiskSpec
fn clone(&self) -> PersistentDiskSpec
Returns a copy 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 PersistentDiskSpec
impl Debug for PersistentDiskSpec
Source§impl Default for PersistentDiskSpec
impl Default for PersistentDiskSpec
Source§fn default() -> PersistentDiskSpec
fn default() -> PersistentDiskSpec
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PersistentDiskSpecwhere
PersistentDiskSpec: Default,
impl<'de> Deserialize<'de> for PersistentDiskSpecwhere
PersistentDiskSpec: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 Message for PersistentDiskSpec
impl Message for PersistentDiskSpec
Source§impl PartialEq for PersistentDiskSpec
impl PartialEq for PersistentDiskSpec
Source§impl Serialize for PersistentDiskSpec
impl Serialize for PersistentDiskSpec
impl StructuralPartialEq for PersistentDiskSpec
Auto Trait Implementations§
impl Freeze for PersistentDiskSpec
impl RefUnwindSafe for PersistentDiskSpec
impl Send for PersistentDiskSpec
impl Sync for PersistentDiskSpec
impl Unpin for PersistentDiskSpec
impl UnwindSafe for PersistentDiskSpec
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