Skip to main content

Network

Struct Network 

Source
pub struct Network { /* private fields */ }
Expand description

One application-level network declaration.

Implementations§

Source§

impl Network

Source

pub const fn new(name: Identifier, ownership: ResourceOwnership) -> Self

Creates a network declaration without inferring runtime settings or defaults.

Source

pub const fn name(&self) -> &Identifier

Returns the neutral resource name.

Source

pub const fn ownership(&self) -> ResourceOwnership

Returns the resource lifecycle owner.

Source

pub fn set_runtime_name(&mut self, name: Sourced<ProtectedString>)

Sets the explicit provider/runtime name distinct from the logical resource key.

Source

pub const fn runtime_name(&self) -> Option<&Sourced<ProtectedString>>

Returns the explicit provider/runtime name.

Source

pub fn set_driver(&mut self, driver: Sourced<ProtectedString>)

Sets the source-authored network driver spelling.

Source

pub const fn driver(&self) -> Option<&Sourced<ProtectedString>>

Returns the explicit network driver spelling.

Source

pub fn set_driver_options(&mut self, options: Vec<Sourced<NetworkDriverOption>>)

Sets ordered driver options while retaining explicit emptiness as a reset.

Source

pub fn set_driver_options_with_origins( &mut self, options: Vec<Sourced<NetworkDriverOption>>, origins: Vec<Provenance>, )

Sets ordered driver options with collection-level provenance.

Source

pub fn add_driver_option(&mut self, option: Sourced<NetworkDriverOption>)

Appends one driver option in source order.

Source

pub fn driver_options(&self) -> Option<&[Sourced<NetworkDriverOption>]>

Returns ordered driver options, preserving omitted versus explicit-empty state.

Source

pub fn driver_options_origins(&self) -> &[Provenance]

Returns collection-level driver-option provenance.

Source

pub fn set_labels(&mut self, labels: Vec<Sourced<MetadataLabel>>)

Sets ordered network metadata labels while retaining explicit emptiness as a reset.

Source

pub fn set_labels_with_origins( &mut self, labels: Vec<Sourced<MetadataLabel>>, origins: Vec<Provenance>, )

Sets ordered network metadata labels with collection-level provenance.

Source

pub fn add_label(&mut self, label: Sourced<MetadataLabel>)

Appends one network metadata label in source order.

Source

pub fn labels(&self) -> Option<&[Sourced<MetadataLabel>]>

Returns ordered network labels, preserving omitted versus explicit-empty state.

Source

pub fn labels_origins(&self) -> &[Provenance]

Returns collection-level network-label provenance.

Source

pub fn set_internal(&mut self, internal: Sourced<bool>)

Sets the literal internal network flag without inferring a source default.

Source

pub const fn internal(&self) -> Option<&Sourced<bool>>

Returns the explicitly authored internal network flag.

Source

pub fn set_ipv6(&mut self, ipv6: Sourced<bool>)

Sets the literal IPv6-enable network flag without inferring a source default.

Source

pub const fn ipv6(&self) -> Option<&Sourced<bool>>

Returns the explicitly authored IPv6-enable network flag.

Source

pub fn set_ipam_driver(&mut self, driver: Sourced<ProtectedString>)

Sets the source-authored IPAM driver spelling.

Source

pub const fn ipam_driver(&self) -> Option<&Sourced<ProtectedString>>

Returns the explicit IPAM driver spelling.

Source

pub fn set_ipam_configs(&mut self, configs: Vec<Sourced<NetworkIpamConfig>>)

Sets ordered associated IPAM rows while retaining explicit emptiness as a reset.

Source

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.

Source

pub fn add_ipam_config(&mut self, config: Sourced<NetworkIpamConfig>)

Appends one independently associated IPAM row in source order.

Source

pub fn ipam_configs(&self) -> Option<&[Sourced<NetworkIpamConfig>]>

Returns ordered associated IPAM rows, preserving omitted versus explicit-empty state.

Source

pub fn ipam_configs_origins(&self) -> &[Provenance]

Returns collection-level IPAM configuration provenance.

Trait Implementations§

Source§

impl Clone for Network

Source§

fn clone(&self) -> Network

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Network

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Network

Source§

impl PartialEq for Network

Source§

fn eq(&self, other: &Network) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Network

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.