#[non_exhaustive]pub struct NetworkConfig {
pub network: String,
pub subnetwork: String,
pub enable_external_ips: bool,
pub can_ip_forward: bool,
pub queue_count: i32,
/* private fields */
}Expand description
Network related configurations.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.network: StringThe name of the network for the TPU node. It must be a preexisting Google Compute Engine network. If none is provided, “default” will be used.
subnetwork: StringThe name of the subnetwork for the TPU node. It must be a preexisting Google Compute Engine subnetwork. If none is provided, “default” will be used.
enable_external_ips: boolIndicates that external IP addresses would be associated with the TPU workers. If set to false, the specified subnetwork or network should have Private Google Access enabled.
can_ip_forward: boolAllows the TPU node to send and receive packets with non-matching destination or source IPs. This is required if you plan to use the TPU workers to forward routes.
queue_count: i32Optional. Specifies networking queue count for TPU VM instance’s network interface.
Implementations§
Source§impl NetworkConfig
impl NetworkConfig
pub fn new() -> Self
Sourcepub fn set_network<T: Into<String>>(self, v: T) -> Self
pub fn set_network<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_subnetwork<T: Into<String>>(self, v: T) -> Self
pub fn set_subnetwork<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_enable_external_ips<T: Into<bool>>(self, v: T) -> Self
pub fn set_enable_external_ips<T: Into<bool>>(self, v: T) -> Self
Sets the value of enable_external_ips.
§Example
let x = NetworkConfig::new().set_enable_external_ips(true);Sourcepub fn set_can_ip_forward<T: Into<bool>>(self, v: T) -> Self
pub fn set_can_ip_forward<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_queue_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_queue_count<T: Into<i32>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for NetworkConfig
impl Clone for NetworkConfig
Source§fn clone(&self) -> NetworkConfig
fn clone(&self) -> NetworkConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more