pub struct NetworkAttachment { /* private fields */ }Expand description
One service attachment to an application network.
Implementations§
Source§impl NetworkAttachment
impl NetworkAttachment
Sourcepub const fn new(network: Identifier, aliases: Vec<String>) -> Self
pub const fn new(network: Identifier, aliases: Vec<String>) -> Self
Creates a network attachment with ordered aliases.
Sourcepub fn with_sourced_aliases(
network: Identifier,
aliases: Vec<Sourced<ProtectedString>>,
) -> Self
pub fn with_sourced_aliases( network: Identifier, aliases: Vec<Sourced<ProtectedString>>, ) -> Self
Creates a network attachment from aliases that retain source provenance.
Sourcepub const fn network(&self) -> &Identifier
pub const fn network(&self) -> &Identifier
Returns the application network name.
Sourcepub fn alias_origins(&self) -> &[Vec<Provenance>]
pub fn alias_origins(&self) -> &[Vec<Provenance>]
Returns alias origins in the same order as Self::aliases.
Values created through Self::new have no individual origins; source adapters should
use Self::with_sourced_aliases or Self::add_alias when provenance is available.
Sourcepub fn alias_sensitivities(&self) -> &[bool]
pub fn alias_sensitivities(&self) -> &[bool]
Returns per-alias sensitivity flags in the same order as Self::aliases.
Values created through Self::new have no explicit sensitive aliases. Target adapters
use this boundary to avoid passing protected aliases into native APIs that cannot redact
them.
Sourcepub fn set_aliases_with_provenance(
&mut self,
aliases: Vec<Sourced<ProtectedString>>,
)
pub fn set_aliases_with_provenance( &mut self, aliases: Vec<Sourced<ProtectedString>>, )
Replaces aliases with ordered provenance-bearing source values.
Sourcepub fn add_alias(&mut self, alias: &Sourced<ProtectedString>)
pub fn add_alias(&mut self, alias: &Sourced<ProtectedString>)
Appends one alias and its provenance.
Sourcepub fn set_ipv4_address(&mut self, address: Sourced<ProtectedString>)
pub fn set_ipv4_address(&mut self, address: Sourced<ProtectedString>)
Sets the attachment’s explicit IPv4 address spelling.
Sourcepub const fn ipv4_address(&self) -> Option<&Sourced<ProtectedString>>
pub const fn ipv4_address(&self) -> Option<&Sourced<ProtectedString>>
Returns the attachment’s explicit IPv4 address spelling.
Sourcepub fn set_ipv6_address(&mut self, address: Sourced<ProtectedString>)
pub fn set_ipv6_address(&mut self, address: Sourced<ProtectedString>)
Sets the attachment’s explicit IPv6 address spelling.
Sourcepub const fn ipv6_address(&self) -> Option<&Sourced<ProtectedString>>
pub const fn ipv6_address(&self) -> Option<&Sourced<ProtectedString>>
Returns the attachment’s explicit IPv6 address spelling.
Trait Implementations§
Source§impl Clone for NetworkAttachment
impl Clone for NetworkAttachment
Source§fn clone(&self) -> NetworkAttachment
fn clone(&self) -> NetworkAttachment
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more