pub struct Addr {
pub ip: IpAddr,
pub prefix: u8,
pub scope: AddrScope,
pub dynamic: bool,
pub temporary: bool,
pub deprecated: bool,
pub mngtmpaddr: bool,
pub noprefixroute: bool,
pub valid_lft: Lifetime,
pub preferred_lft: Lifetime,
pub label: Option<String>,
}Expand description
A single address bound to a link.
Fields§
§ip: IpAddrThe IP address.
prefix: u8Prefix length (CIDR).
scope: AddrScope§dynamic: boolAddress was assigned dynamically (DHCP or SLAAC).
temporary: boolRFC 4941 privacy extension address (IPv6).
deprecated: boolpreferred_lft == 0. New outgoing connections avoid these.
mngtmpaddr: boolSLAAC “manage temporary addresses” — the stable base from which privacy addresses are derived.
noprefixroute: boolIFA_F_NOPREFIXROUTE: a connected prefix route was not installed.
valid_lft: LifetimeHow long the address is valid. Forever for static addresses.
preferred_lft: LifetimeHow long the address is preferred for new outgoing connections.
label: Option<String>Optional label string (from ip addr).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Addr
impl<'de> Deserialize<'de> for Addr
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Addr
impl StructuralPartialEq for Addr
Auto Trait Implementations§
impl Freeze for Addr
impl RefUnwindSafe for Addr
impl Send for Addr
impl Sync for Addr
impl Unpin for Addr
impl UnsafeUnpin for Addr
impl UnwindSafe for Addr
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