#[non_exhaustive]pub struct AliasIpRange {
pub ip_cidr_range: Option<String>,
pub subnetwork_range_name: Option<String>,
/* private fields */
}Available on crate features
instance-templates or instances or machine-images or region-instance-templates or region-instances only.Expand description
An alias IP range attached to an instance’s network interface.
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.ip_cidr_range: Option<String>The IP alias ranges to allocate for this interface. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (such as 10.2.3.4), a netmask (such as/24) or a CIDR-formatted string (such as10.1.2.0/24).
subnetwork_range_name: Option<String>The name of a subnetwork secondary IP range from which to allocate an IP alias range. If not specified, the primary range of the subnetwork is used.
Implementations§
Source§impl AliasIpRange
impl AliasIpRange
pub fn new() -> Self
Sourcepub fn set_ip_cidr_range<T>(self, v: T) -> Self
pub fn set_ip_cidr_range<T>(self, v: T) -> Self
Sets the value of ip_cidr_range.
§Example
ⓘ
let x = AliasIpRange::new().set_ip_cidr_range("example");Sourcepub fn set_or_clear_ip_cidr_range<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_ip_cidr_range<T>(self, v: Option<T>) -> Self
Sets or clears the value of ip_cidr_range.
§Example
ⓘ
let x = AliasIpRange::new().set_or_clear_ip_cidr_range(Some("example"));
let x = AliasIpRange::new().set_or_clear_ip_cidr_range(None::<String>);Sourcepub fn set_subnetwork_range_name<T>(self, v: T) -> Self
pub fn set_subnetwork_range_name<T>(self, v: T) -> Self
Sets the value of subnetwork_range_name.
§Example
ⓘ
let x = AliasIpRange::new().set_subnetwork_range_name("example");Sourcepub fn set_or_clear_subnetwork_range_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_subnetwork_range_name<T>(self, v: Option<T>) -> Self
Sets or clears the value of subnetwork_range_name.
§Example
ⓘ
let x = AliasIpRange::new().set_or_clear_subnetwork_range_name(Some("example"));
let x = AliasIpRange::new().set_or_clear_subnetwork_range_name(None::<String>);Trait Implementations§
Source§impl Clone for AliasIpRange
impl Clone for AliasIpRange
Source§fn clone(&self) -> AliasIpRange
fn clone(&self) -> AliasIpRange
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 AliasIpRange
impl Debug for AliasIpRange
Source§impl Default for AliasIpRange
impl Default for AliasIpRange
Source§fn default() -> AliasIpRange
fn default() -> AliasIpRange
Returns the “default value” for a type. Read more
Source§impl Message for AliasIpRange
impl Message for AliasIpRange
Source§impl PartialEq for AliasIpRange
impl PartialEq for AliasIpRange
impl StructuralPartialEq for AliasIpRange
Auto Trait Implementations§
impl Freeze for AliasIpRange
impl RefUnwindSafe for AliasIpRange
impl Send for AliasIpRange
impl Sync for AliasIpRange
impl Unpin for AliasIpRange
impl UnwindSafe for AliasIpRange
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