pub struct DualStackConfig {
pub ipv4_enabled: bool,
pub ipv6_enabled: bool,
pub prefer_ipv6: bool,
pub ipv6_addresses: Vec<Ipv6InterfaceAddr>,
}Expand description
Dual-stack network configuration
Fields§
§ipv4_enabled: boolWhether IPv4 is enabled on this interface
ipv6_enabled: boolWhether IPv6 is enabled on this interface
prefer_ipv6: boolWhether to prefer IPv6 for dual-stack connections
ipv6_addresses: Vec<Ipv6InterfaceAddr>List of configured IPv6 addresses on this interface
Implementations§
Source§impl DualStackConfig
impl DualStackConfig
Sourcepub fn link_local_addr(&self) -> Option<&Ipv6InterfaceAddr>
pub fn link_local_addr(&self) -> Option<&Ipv6InterfaceAddr>
Get the primary link-local address, if any
Sourcepub fn global_addr(&self) -> Option<&Ipv6InterfaceAddr>
pub fn global_addr(&self) -> Option<&Ipv6InterfaceAddr>
Get the primary global address, if any
Sourcepub fn addresses_by_scope(&self, scope: Ipv6Scope) -> Vec<&Ipv6InterfaceAddr>
pub fn addresses_by_scope(&self, scope: Ipv6Scope) -> Vec<&Ipv6InterfaceAddr>
Get all addresses of a given scope
Trait Implementations§
Source§impl Clone for DualStackConfig
impl Clone for DualStackConfig
Source§fn clone(&self) -> DualStackConfig
fn clone(&self) -> DualStackConfig
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DualStackConfig
impl Debug for DualStackConfig
Auto Trait Implementations§
impl Freeze for DualStackConfig
impl RefUnwindSafe for DualStackConfig
impl Send for DualStackConfig
impl Sync for DualStackConfig
impl Unpin for DualStackConfig
impl UnwindSafe for DualStackConfig
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)