pub struct NetworkIpamConfig { /* private fields */ }Expand description
One explicitly associated IPAM configuration row.
A row never pairs independent native subnet, gateway, and range collections by position: adapters retain the source association only when it is present. The subnet is required, while gateway and range remain independently optional and sourced.
Implementations§
Source§impl NetworkIpamConfig
impl NetworkIpamConfig
Sourcepub fn new(subnet: Sourced<ProtectedString>) -> Result<Self, ModelError>
pub fn new(subnet: Sourced<ProtectedString>) -> Result<Self, ModelError>
Creates one IPAM row with a required non-empty subnet spelling.
§Errors
Returns ModelError::EmptyValue or ModelError::ContainsNul for the subnet.
Sourcepub const fn subnet(&self) -> &Sourced<ProtectedString>
pub const fn subnet(&self) -> &Sourced<ProtectedString>
Returns the required subnet spelling and its provenance.
Sourcepub fn set_gateway(
&mut self,
gateway: Sourced<ProtectedString>,
) -> Result<(), ModelError>
pub fn set_gateway( &mut self, gateway: Sourced<ProtectedString>, ) -> Result<(), ModelError>
Sets an explicitly associated gateway spelling.
§Errors
Returns ModelError::EmptyValue or ModelError::ContainsNul.
Sourcepub const fn gateway(&self) -> Option<&Sourced<ProtectedString>>
pub const fn gateway(&self) -> Option<&Sourced<ProtectedString>>
Returns the optional gateway spelling and its provenance.
Sourcepub fn set_ip_range(
&mut self,
ip_range: Sourced<ProtectedString>,
) -> Result<(), ModelError>
pub fn set_ip_range( &mut self, ip_range: Sourced<ProtectedString>, ) -> Result<(), ModelError>
Sets an explicitly associated IP-range spelling.
§Errors
Returns ModelError::EmptyValue or ModelError::ContainsNul.
Sourcepub const fn ip_range(&self) -> Option<&Sourced<ProtectedString>>
pub const fn ip_range(&self) -> Option<&Sourced<ProtectedString>>
Returns the optional IP-range spelling and its provenance.
Trait Implementations§
Source§impl Clone for NetworkIpamConfig
impl Clone for NetworkIpamConfig
Source§fn clone(&self) -> NetworkIpamConfig
fn clone(&self) -> NetworkIpamConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more