pub struct NetworkCapabilities {
pub has_ipv6: bool,
pub has_ipv4: bool,
pub behind_nat: bool,
pub public_ipv4: Option<Ipv4Addr>,
pub ipv6_addresses: Vec<Ipv6Addr>,
pub has_upnp: bool,
pub interface_mtu: u16,
}
Expand description
Capabilities of the current network environment for tunneling
Fields§
§has_ipv6: bool
Whether IPv6 is natively available
has_ipv4: bool
Whether IPv4 is available
behind_nat: bool
Whether the host is behind NAT
public_ipv4: Option<Ipv4Addr>
Detected public IPv4 address
ipv6_addresses: Vec<Ipv6Addr>
Available IPv6 addresses
has_upnp: bool
Whether UPnP is available for port mapping
interface_mtu: u16
MTU of the primary network interface
Trait Implementations§
Source§impl Clone for NetworkCapabilities
impl Clone for NetworkCapabilities
Source§fn clone(&self) -> NetworkCapabilities
fn clone(&self) -> NetworkCapabilities
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for NetworkCapabilities
impl RefUnwindSafe for NetworkCapabilities
impl Send for NetworkCapabilities
impl Sync for NetworkCapabilities
impl Unpin for NetworkCapabilities
impl UnwindSafe for NetworkCapabilities
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more