#[non_exhaustive]pub struct NetworkSpec {
pub enable_internet_access: bool,
pub network: String,
pub subnetwork: String,
/* private fields */
}Expand description
Network spec.
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.enable_internet_access: boolWhether to enable public internet access. Default false.
network: StringThe full name of the Google Compute Engine network
subnetwork: StringThe name of the subnet that this instance is in.
Format:
projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}
Implementations§
Source§impl NetworkSpec
impl NetworkSpec
pub fn new() -> Self
Sourcepub fn set_enable_internet_access<T: Into<bool>>(self, v: T) -> Self
pub fn set_enable_internet_access<T: Into<bool>>(self, v: T) -> Self
Sets the value of enable_internet_access.
Sourcepub fn set_network<T: Into<String>>(self, v: T) -> Self
pub fn set_network<T: Into<String>>(self, v: T) -> Self
Sets the value of network.
Sourcepub fn set_subnetwork<T: Into<String>>(self, v: T) -> Self
pub fn set_subnetwork<T: Into<String>>(self, v: T) -> Self
Sets the value of subnetwork.
Trait Implementations§
Source§impl Clone for NetworkSpec
impl Clone for NetworkSpec
Source§fn clone(&self) -> NetworkSpec
fn clone(&self) -> NetworkSpec
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 NetworkSpec
impl Debug for NetworkSpec
Source§impl Default for NetworkSpec
impl Default for NetworkSpec
Source§fn default() -> NetworkSpec
fn default() -> NetworkSpec
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for NetworkSpecwhere
NetworkSpec: Default,
impl<'de> Deserialize<'de> for NetworkSpecwhere
NetworkSpec: 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 NetworkSpec
impl Message for NetworkSpec
Source§impl PartialEq for NetworkSpec
impl PartialEq for NetworkSpec
Source§impl Serialize for NetworkSpec
impl Serialize for NetworkSpec
impl StructuralPartialEq for NetworkSpec
Auto Trait Implementations§
impl Freeze for NetworkSpec
impl RefUnwindSafe for NetworkSpec
impl Send for NetworkSpec
impl Sync for NetworkSpec
impl Unpin for NetworkSpec
impl UnwindSafe for NetworkSpec
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