pub struct AddressMessage { /* private fields */ }Expand description
Strongly-typed address message with all attributes parsed.
Implementations§
Source§impl AddressMessage
impl AddressMessage
Sourcepub fn prefix_len(&self) -> u8
pub fn prefix_len(&self) -> u8
Get the prefix length.
Sourcepub fn cache_info(&self) -> Option<&AddressCacheInfo>
pub fn cache_info(&self) -> Option<&AddressCacheInfo>
Get the cache info.
Sourcepub fn primary_address(&self) -> Option<&IpAddr>
pub fn primary_address(&self) -> Option<&IpAddr>
Get the primary address (local or address).
For point-to-point links, local is the local address and address is
the peer address. For other links, they are typically the same.
Sourcepub fn is_secondary(&self) -> bool
pub fn is_secondary(&self) -> bool
Check if this is a secondary/temporary address.
Sourcepub fn is_permanent(&self) -> bool
pub fn is_permanent(&self) -> bool
Check if this is a permanent address.
Sourcepub fn is_deprecated(&self) -> bool
pub fn is_deprecated(&self) -> bool
Check if this address is deprecated.
Sourcepub fn is_tentative(&self) -> bool
pub fn is_tentative(&self) -> bool
Check if this address is tentative.
Trait Implementations§
Source§impl Clone for AddressMessage
impl Clone for AddressMessage
Source§fn clone(&self) -> AddressMessage
fn clone(&self) -> AddressMessage
Returns a duplicate 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 AddressMessage
impl Debug for AddressMessage
Source§impl Default for AddressMessage
impl Default for AddressMessage
Source§fn default() -> AddressMessage
fn default() -> AddressMessage
Returns the “default value” for a type. Read more
Source§impl FromNetlink for AddressMessage
impl FromNetlink for AddressMessage
Source§fn write_dump_header(buf: &mut Vec<u8>)
fn write_dump_header(buf: &mut Vec<u8>)
Write the header required for dump requests.
This is appended to the netlink message after the nlmsghdr.
Default implementation writes nothing (for messages that don’t need a header).
Source§fn parse(input: &mut &[u8]) -> PResult<Self>
fn parse(input: &mut &[u8]) -> PResult<Self>
Parse from a mutable byte slice reference.
The slice is advanced past the consumed bytes.
Source§fn from_bytes(data: &[u8]) -> Result<Self>
fn from_bytes(data: &[u8]) -> Result<Self>
Parse from a complete byte slice.
Source§impl Printable for AddressMessage
impl Printable for AddressMessage
Source§impl ToNetlink for AddressMessage
impl ToNetlink for AddressMessage
Auto Trait Implementations§
impl Freeze for AddressMessage
impl RefUnwindSafe for AddressMessage
impl Send for AddressMessage
impl Sync for AddressMessage
impl Unpin for AddressMessage
impl UnwindSafe for AddressMessage
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