pub struct GeneratedNetworkAttachment { /* private fields */ }Expand description
One generated service network attachment and its ordered aliases.
Implementations§
Source§impl GeneratedNetworkAttachment
impl GeneratedNetworkAttachment
Sourcepub fn new(name: impl Into<String>) -> Result<Self, GenerationError>
pub fn new(name: impl Into<String>) -> Result<Self, GenerationError>
Creates an attachment without aliases or per-network addresses.
§Errors
Rejects an empty or NUL-bearing network name.
Sourcepub fn add_alias_value(
&mut self,
alias: &GeneratedString,
) -> Result<(), GenerationError>
pub fn add_alias_value( &mut self, alias: &GeneratedString, ) -> Result<(), GenerationError>
Adds one ordered alias through the generated-string sensitivity boundary.
§Errors
Rejects an empty alias. NUL-bearing values are rejected while constructing
GeneratedString.
Sourcepub fn set_ipv4_address(
&mut self,
address: GeneratedString,
) -> Result<(), GenerationError>
pub fn set_ipv4_address( &mut self, address: GeneratedString, ) -> Result<(), GenerationError>
Sets one raw per-attachment IPv4 address exactly once.
No IP grammar, top-level IPAM pool, provider, or runtime validation is applied.
§Errors
Returns GenerationError::DuplicateField when already configured.
Sourcepub fn set_ipv6_address(
&mut self,
address: GeneratedString,
) -> Result<(), GenerationError>
pub fn set_ipv6_address( &mut self, address: GeneratedString, ) -> Result<(), GenerationError>
Sets one raw per-attachment IPv6 address exactly once.
No IP grammar, top-level IPAM pool, provider, or runtime validation is applied.
§Errors
Returns GenerationError::DuplicateField when already configured.
Sourcepub fn alias_sensitivities(&self) -> &[bool]
pub fn alias_sensitivities(&self) -> &[bool]
Returns per-alias sensitivity flags in the same order as Self::aliases.
Sourcepub const fn ipv4_address(&self) -> Option<&GeneratedString>
pub const fn ipv4_address(&self) -> Option<&GeneratedString>
Returns the optional raw per-attachment IPv4 address.
Sourcepub const fn ipv6_address(&self) -> Option<&GeneratedString>
pub const fn ipv6_address(&self) -> Option<&GeneratedString>
Returns the optional raw per-attachment IPv6 address.
Trait Implementations§
Source§impl Clone for GeneratedNetworkAttachment
impl Clone for GeneratedNetworkAttachment
Source§fn clone(&self) -> GeneratedNetworkAttachment
fn clone(&self) -> GeneratedNetworkAttachment
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more