#[non_exhaustive]pub struct LocalDisk {
pub disk_count: Option<i32>,
pub disk_size_gb: Option<i32>,
pub disk_type: Option<String>,
/* private fields */
}Available on crate features
node-groups or node-templates only.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_count: Option<i32>Specifies the number of such disks.
disk_size_gb: Option<i32>Specifies the size of the disk in base-2 GB.
disk_type: Option<String>Specifies the desired disk type on the node. This disk type must be a local storage type (e.g.: local-ssd). Note that for nodeTemplates, this should be the name of the disk type and not its URL.
Implementations§
Source§impl LocalDisk
impl LocalDisk
pub fn new() -> Self
Sourcepub fn set_disk_count<T>(self, v: T) -> Self
pub fn set_disk_count<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_disk_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_disk_count<T>(self, v: Option<T>) -> Self
Sets or clears the value of disk_count.
§Example
ⓘ
let x = LocalDisk::new().set_or_clear_disk_count(Some(42));
let x = LocalDisk::new().set_or_clear_disk_count(None::<i32>);Sourcepub fn set_disk_size_gb<T>(self, v: T) -> Self
pub fn set_disk_size_gb<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_disk_size_gb<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_disk_size_gb<T>(self, v: Option<T>) -> Self
Sets or clears the value of disk_size_gb.
§Example
ⓘ
let x = LocalDisk::new().set_or_clear_disk_size_gb(Some(42));
let x = LocalDisk::new().set_or_clear_disk_size_gb(None::<i32>);Sourcepub fn set_disk_type<T>(self, v: T) -> Self
pub fn set_disk_type<T>(self, v: T) -> Self
Trait Implementations§
impl StructuralPartialEq for LocalDisk
Auto Trait Implementations§
impl Freeze for LocalDisk
impl RefUnwindSafe for LocalDisk
impl Send for LocalDisk
impl Sync for LocalDisk
impl Unpin for LocalDisk
impl UnwindSafe for LocalDisk
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