pub struct Network { /* private fields */ }Expand description
One application-level network declaration.
Implementations§
Source§impl Network
impl Network
Sourcepub const fn new(name: Identifier, ownership: ResourceOwnership) -> Self
pub const fn new(name: Identifier, ownership: ResourceOwnership) -> Self
Creates a network declaration without inferring runtime settings or defaults.
Sourcepub const fn name(&self) -> &Identifier
pub const fn name(&self) -> &Identifier
Returns the neutral resource name.
Sourcepub const fn ownership(&self) -> ResourceOwnership
pub const fn ownership(&self) -> ResourceOwnership
Returns the resource lifecycle owner.
Sourcepub fn set_runtime_name(&mut self, name: Sourced<ProtectedString>)
pub fn set_runtime_name(&mut self, name: Sourced<ProtectedString>)
Sets the explicit provider/runtime name distinct from the logical resource key.
Sourcepub const fn runtime_name(&self) -> Option<&Sourced<ProtectedString>>
pub const fn runtime_name(&self) -> Option<&Sourced<ProtectedString>>
Returns the explicit provider/runtime name.
Sourcepub fn set_driver(&mut self, driver: Sourced<ProtectedString>)
pub fn set_driver(&mut self, driver: Sourced<ProtectedString>)
Sets the source-authored network driver spelling.
Sourcepub const fn driver(&self) -> Option<&Sourced<ProtectedString>>
pub const fn driver(&self) -> Option<&Sourced<ProtectedString>>
Returns the explicit network driver spelling.
Sourcepub fn set_driver_options(&mut self, options: Vec<Sourced<NetworkDriverOption>>)
pub fn set_driver_options(&mut self, options: Vec<Sourced<NetworkDriverOption>>)
Sets ordered driver options while retaining explicit emptiness as a reset.
Sourcepub fn set_driver_options_with_origins(
&mut self,
options: Vec<Sourced<NetworkDriverOption>>,
origins: Vec<Provenance>,
)
pub fn set_driver_options_with_origins( &mut self, options: Vec<Sourced<NetworkDriverOption>>, origins: Vec<Provenance>, )
Sets ordered driver options with collection-level provenance.
Sourcepub fn add_driver_option(&mut self, option: Sourced<NetworkDriverOption>)
pub fn add_driver_option(&mut self, option: Sourced<NetworkDriverOption>)
Appends one driver option in source order.
Sourcepub fn driver_options(&self) -> Option<&[Sourced<NetworkDriverOption>]>
pub fn driver_options(&self) -> Option<&[Sourced<NetworkDriverOption>]>
Returns ordered driver options, preserving omitted versus explicit-empty state.
Sourcepub fn driver_options_origins(&self) -> &[Provenance]
pub fn driver_options_origins(&self) -> &[Provenance]
Returns collection-level driver-option provenance.
Sourcepub fn set_labels(&mut self, labels: Vec<Sourced<MetadataLabel>>)
pub fn set_labels(&mut self, labels: Vec<Sourced<MetadataLabel>>)
Sets ordered network metadata labels while retaining explicit emptiness as a reset.
Sourcepub fn set_labels_with_origins(
&mut self,
labels: Vec<Sourced<MetadataLabel>>,
origins: Vec<Provenance>,
)
pub fn set_labels_with_origins( &mut self, labels: Vec<Sourced<MetadataLabel>>, origins: Vec<Provenance>, )
Sets ordered network metadata labels with collection-level provenance.
Sourcepub fn add_label(&mut self, label: Sourced<MetadataLabel>)
pub fn add_label(&mut self, label: Sourced<MetadataLabel>)
Appends one network metadata label in source order.
Sourcepub fn labels(&self) -> Option<&[Sourced<MetadataLabel>]>
pub fn labels(&self) -> Option<&[Sourced<MetadataLabel>]>
Returns ordered network labels, preserving omitted versus explicit-empty state.
Sourcepub fn labels_origins(&self) -> &[Provenance]
pub fn labels_origins(&self) -> &[Provenance]
Returns collection-level network-label provenance.
Sourcepub fn set_internal(&mut self, internal: Sourced<bool>)
pub fn set_internal(&mut self, internal: Sourced<bool>)
Sets the literal internal network flag without inferring a source default.
Sourcepub const fn internal(&self) -> Option<&Sourced<bool>>
pub const fn internal(&self) -> Option<&Sourced<bool>>
Returns the explicitly authored internal network flag.
Sourcepub fn set_ipv6(&mut self, ipv6: Sourced<bool>)
pub fn set_ipv6(&mut self, ipv6: Sourced<bool>)
Sets the literal IPv6-enable network flag without inferring a source default.
Sourcepub const fn ipv6(&self) -> Option<&Sourced<bool>>
pub const fn ipv6(&self) -> Option<&Sourced<bool>>
Returns the explicitly authored IPv6-enable network flag.
Sourcepub fn set_ipam_driver(&mut self, driver: Sourced<ProtectedString>)
pub fn set_ipam_driver(&mut self, driver: Sourced<ProtectedString>)
Sets the source-authored IPAM driver spelling.
Sourcepub const fn ipam_driver(&self) -> Option<&Sourced<ProtectedString>>
pub const fn ipam_driver(&self) -> Option<&Sourced<ProtectedString>>
Returns the explicit IPAM driver spelling.
Sourcepub fn set_ipam_configs(&mut self, configs: Vec<Sourced<NetworkIpamConfig>>)
pub fn set_ipam_configs(&mut self, configs: Vec<Sourced<NetworkIpamConfig>>)
Sets ordered associated IPAM rows while retaining explicit emptiness as a reset.
Sourcepub fn set_ipam_configs_with_origins(
&mut self,
configs: Vec<Sourced<NetworkIpamConfig>>,
origins: Vec<Provenance>,
)
pub fn set_ipam_configs_with_origins( &mut self, configs: Vec<Sourced<NetworkIpamConfig>>, origins: Vec<Provenance>, )
Sets ordered associated IPAM rows with collection-level provenance.
Sourcepub fn add_ipam_config(&mut self, config: Sourced<NetworkIpamConfig>)
pub fn add_ipam_config(&mut self, config: Sourced<NetworkIpamConfig>)
Appends one independently associated IPAM row in source order.
Sourcepub fn ipam_configs(&self) -> Option<&[Sourced<NetworkIpamConfig>]>
pub fn ipam_configs(&self) -> Option<&[Sourced<NetworkIpamConfig>]>
Returns ordered associated IPAM rows, preserving omitted versus explicit-empty state.
Sourcepub fn ipam_configs_origins(&self) -> &[Provenance]
pub fn ipam_configs_origins(&self) -> &[Provenance]
Returns collection-level IPAM configuration provenance.