pub struct NeighborMessage { /* private fields */ }Expand description
Strongly-typed neighbor message with all attributes parsed.
Implementations§
Source§impl NeighborMessage
impl NeighborMessage
Sourcepub fn state(&self) -> NeighborState
pub fn state(&self) -> NeighborState
Get the neighbor state.
Sourcepub fn destination(&self) -> Option<&IpAddr>
pub fn destination(&self) -> Option<&IpAddr>
Get the destination address.
Sourcepub fn cache_info(&self) -> Option<&NeighborCacheInfo>
pub fn cache_info(&self) -> Option<&NeighborCacheInfo>
Get the cache info.
Sourcepub fn mac_address(&self) -> Option<String>
pub fn mac_address(&self) -> Option<String>
Format the link-layer address as a MAC string.
Sourcepub fn is_reachable(&self) -> bool
pub fn is_reachable(&self) -> bool
Check if the neighbor is reachable.
Sourcepub fn is_permanent(&self) -> bool
pub fn is_permanent(&self) -> bool
Check if the neighbor is permanent.
Sourcepub fn is_incomplete(&self) -> bool
pub fn is_incomplete(&self) -> bool
Check if the neighbor is incomplete.
Trait Implementations§
Source§impl Clone for NeighborMessage
impl Clone for NeighborMessage
Source§fn clone(&self) -> NeighborMessage
fn clone(&self) -> NeighborMessage
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 NeighborMessage
impl Debug for NeighborMessage
Source§impl Default for NeighborMessage
impl Default for NeighborMessage
Source§fn default() -> NeighborMessage
fn default() -> NeighborMessage
Returns the “default value” for a type. Read more
Source§impl FromNetlink for NeighborMessage
impl FromNetlink for NeighborMessage
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 NeighborMessage
impl Printable for NeighborMessage
Source§impl ToNetlink for NeighborMessage
impl ToNetlink for NeighborMessage
Auto Trait Implementations§
impl Freeze for NeighborMessage
impl RefUnwindSafe for NeighborMessage
impl Send for NeighborMessage
impl Sync for NeighborMessage
impl Unpin for NeighborMessage
impl UnwindSafe for NeighborMessage
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