Struct veilid_tools::NetworkInterface
source · pub struct NetworkInterface {
pub name: String,
pub flags: InterfaceFlags,
pub addrs: Vec<InterfaceAddress>,
}
Fields§
§name: String
§flags: InterfaceFlags
§addrs: Vec<InterfaceAddress>
Implementations§
source§impl NetworkInterface
impl NetworkInterface
pub fn new(name: String, flags: InterfaceFlags) -> Self
pub fn name(&self) -> String
pub fn is_loopback(&self) -> bool
pub fn is_point_to_point(&self) -> bool
pub fn is_running(&self) -> bool
pub fn has_default_route(&self) -> bool
pub fn primary_ipv4(&self) -> Option<InterfaceAddress>
pub fn primary_ipv6(&self) -> Option<InterfaceAddress>
Trait Implementations§
source§impl Clone for NetworkInterface
impl Clone for NetworkInterface
source§fn clone(&self) -> NetworkInterface
fn clone(&self) -> NetworkInterface
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for NetworkInterface
impl Debug for NetworkInterface
source§impl PartialEq for NetworkInterface
impl PartialEq for NetworkInterface
source§fn eq(&self, other: &NetworkInterface) -> bool
fn eq(&self, other: &NetworkInterface) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for NetworkInterface
impl StructuralPartialEq for NetworkInterface
Auto Trait Implementations§
impl Freeze for NetworkInterface
impl RefUnwindSafe for NetworkInterface
impl Send for NetworkInterface
impl Sync for NetworkInterface
impl Unpin for NetworkInterface
impl UnwindSafe for NetworkInterface
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more