#[non_exhaustive]pub struct PreservedState {
pub disks: HashMap<String, PreservedStatePreservedDisk>,
pub external_i_ps: HashMap<String, PreservedStatePreservedNetworkIp>,
pub internal_i_ps: HashMap<String, PreservedStatePreservedNetworkIp>,
pub metadata: HashMap<String, String>,
/* private fields */
}Available on crate features
instance-group-managers or region-instance-group-managers only.Expand description
Preserved state for a given instance.
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.disks: HashMap<String, PreservedStatePreservedDisk>Preserved disks defined for this instance. This map is keyed with the device names of the disks.
external_i_ps: HashMap<String, PreservedStatePreservedNetworkIp>Preserved external IPs defined for this instance. This map is keyed with the name of the network interface.
internal_i_ps: HashMap<String, PreservedStatePreservedNetworkIp>Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface.
metadata: HashMap<String, String>Preserved metadata defined for this instance.
Implementations§
Source§impl PreservedState
impl PreservedState
pub fn new() -> Self
Sourcepub fn set_external_i_ps<T, K, V>(self, v: T) -> Self
pub fn set_external_i_ps<T, K, V>(self, v: T) -> Self
Sets the value of external_i_ps.
§Example
ⓘ
use google_cloud_compute_v1::model::PreservedStatePreservedNetworkIp;
let x = PreservedState::new().set_external_i_ps([
("key0", PreservedStatePreservedNetworkIp::default()/* use setters */),
("key1", PreservedStatePreservedNetworkIp::default()/* use (different) setters */),
]);Sourcepub fn set_internal_i_ps<T, K, V>(self, v: T) -> Self
pub fn set_internal_i_ps<T, K, V>(self, v: T) -> Self
Sets the value of internal_i_ps.
§Example
ⓘ
use google_cloud_compute_v1::model::PreservedStatePreservedNetworkIp;
let x = PreservedState::new().set_internal_i_ps([
("key0", PreservedStatePreservedNetworkIp::default()/* use setters */),
("key1", PreservedStatePreservedNetworkIp::default()/* use (different) setters */),
]);Trait Implementations§
Source§impl Clone for PreservedState
impl Clone for PreservedState
Source§fn clone(&self) -> PreservedState
fn clone(&self) -> PreservedState
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 PreservedState
impl Debug for PreservedState
Source§impl Default for PreservedState
impl Default for PreservedState
Source§fn default() -> PreservedState
fn default() -> PreservedState
Returns the “default value” for a type. Read more
Source§impl Message for PreservedState
impl Message for PreservedState
Source§impl PartialEq for PreservedState
impl PartialEq for PreservedState
impl StructuralPartialEq for PreservedState
Auto Trait Implementations§
impl Freeze for PreservedState
impl RefUnwindSafe for PreservedState
impl Send for PreservedState
impl Sync for PreservedState
impl Unpin for PreservedState
impl UnwindSafe for PreservedState
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