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 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 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
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 GeneratedNetworkAttachment
impl Debug for GeneratedNetworkAttachment
impl Eq for GeneratedNetworkAttachment
impl StructuralPartialEq for GeneratedNetworkAttachment
Auto Trait Implementations§
impl Freeze for GeneratedNetworkAttachment
impl RefUnwindSafe for GeneratedNetworkAttachment
impl Send for GeneratedNetworkAttachment
impl Sync for GeneratedNetworkAttachment
impl Unpin for GeneratedNetworkAttachment
impl UnsafeUnpin for GeneratedNetworkAttachment
impl UnwindSafe for GeneratedNetworkAttachment
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