#[non_exhaustive]pub struct IfaceAddr {
pub cidr: IpCidr,
pub origin: AddrOrigin,
pub preferred_until: Option<Instant>,
}Expand description
An IP address assigned to an interface.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.cidr: IpCidrThe address and its prefix.
origin: AddrOriginWhere the address came from.
preferred_until: Option<Instant>When the address stops being preferred and becomes deprecated
(RFC 4862 section 5.5.4). None means “forever”.
Only SLAAC sets this: a router advertises a preferred lifetime alongside the valid one, and shortens it to zero to signal that a prefix is on its way out while addresses formed from it still work.
Implementations§
Trait Implementations§
impl Copy for IfaceAddr
impl Eq for IfaceAddr
impl StructuralPartialEq for IfaceAddr
Auto Trait Implementations§
impl Freeze for IfaceAddr
impl RefUnwindSafe for IfaceAddr
impl Send for IfaceAddr
impl Sync for IfaceAddr
impl Unpin for IfaceAddr
impl UnsafeUnpin for IfaceAddr
impl UnwindSafe for IfaceAddr
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