pub struct Ifv4Addr {
pub ip: Ipv4Addr,
pub netmask: Ipv4Addr,
pub prefixlen: u8,
pub broadcast: Option<Ipv4Addr>,
}
Expand description
Details about the ipv4 address of an interface on this host.
Fields§
§ip: Ipv4Addr
The IP address of the interface.
netmask: Ipv4Addr
The netmask of the interface.
prefixlen: u8
The CIDR prefix of the interface.
broadcast: Option<Ipv4Addr>
The broadcast address of the interface.
Implementations§
source§impl Ifv4Addr
impl Ifv4Addr
sourcepub const fn is_loopback(&self) -> bool
pub const fn is_loopback(&self) -> bool
Check whether this is a loopback address.
sourcepub const fn is_link_local(&self) -> bool
pub const fn is_link_local(&self) -> bool
Check whether this is a link local address.
Trait Implementations§
impl Eq for Ifv4Addr
impl StructuralPartialEq for Ifv4Addr
Auto Trait Implementations§
impl Freeze for Ifv4Addr
impl RefUnwindSafe for Ifv4Addr
impl Send for Ifv4Addr
impl Sync for Ifv4Addr
impl Unpin for Ifv4Addr
impl UnwindSafe for Ifv4Addr
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, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)