#[non_exhaustive]pub struct Network {
pub forwarded_ports: Vec<String>,
pub instance_tag: String,
pub name: String,
pub subnetwork_name: String,
pub session_affinity: bool,
/* private fields */
}Expand description
Extra network settings. Only applicable in the App Engine flexible environment.
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.forwarded_ports: Vec<String>List of ports, or port pairs, to forward from the virtual machine to the application container. Only applicable in the App Engine flexible environment.
instance_tag: StringTag to apply to the instance during creation. Only applicable in the App Engine flexible environment.
name: StringGoogle Compute Engine network where the virtual machines are created. Specify the short name, not the resource path.
Defaults to default.
subnetwork_name: StringGoogle Cloud Platform sub-network where the virtual machines are created. Specify the short name, not the resource path.
If a subnetwork name is specified, a network name will also be required unless it is for the default network.
- If the network that the instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range.
- If the network that the instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network.
- If the network that the instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork.
If specified, the subnetwork must exist in the same region as the App Engine flexible environment application.
session_affinity: boolEnable session affinity. Only applicable in the App Engine flexible environment.
Implementations§
Source§impl Network
impl Network
Sourcepub fn set_forwarded_ports<T, V>(self, v: T) -> Self
pub fn set_forwarded_ports<T, V>(self, v: T) -> Self
Sets the value of forwarded_ports.
§Example
let x = Network::new().set_forwarded_ports(["a", "b", "c"]);Sourcepub fn set_instance_tag<T: Into<String>>(self, v: T) -> Self
pub fn set_instance_tag<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_subnetwork_name<T: Into<String>>(self, v: T) -> Self
pub fn set_subnetwork_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_session_affinity<T: Into<bool>>(self, v: T) -> Self
pub fn set_session_affinity<T: Into<bool>>(self, v: T) -> Self
Trait Implementations§
impl StructuralPartialEq for Network
Auto Trait Implementations§
impl Freeze for Network
impl RefUnwindSafe for Network
impl Send for Network
impl Sync for Network
impl Unpin for Network
impl UnsafeUnpin for Network
impl UnwindSafe for Network
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request