pub struct LinkAddr(/* private fields */);
Available on crate feature
socket
only.Expand description
Hardware Address
Implementations§
source§impl LinkAddr
impl LinkAddr
sourcepub fn ifindex(&self) -> usize
Available on crate feature net
only.
pub fn ifindex(&self) -> usize
net
only.interface index, if != 0, system given index for interface
sourcepub fn datalink_type(&self) -> u8
Available on crate feature net
only.
pub fn datalink_type(&self) -> u8
net
only.Datalink type
Trait Implementations§
source§impl AsRef<sockaddr_dl> for LinkAddr
Available on crate feature net
only.
impl AsRef<sockaddr_dl> for LinkAddr
Available on crate feature
net
only.source§fn as_ref(&self) -> &sockaddr_dl
fn as_ref(&self) -> &sockaddr_dl
Converts this type into a shared reference of the (usually inferred) input type.
source§impl PartialEq for LinkAddr
impl PartialEq for LinkAddr
source§impl SockaddrLike for LinkAddr
Available on crate feature net
only.
impl SockaddrLike for LinkAddr
Available on crate feature
net
only.source§unsafe fn from_raw(
addr: *const sockaddr,
len: Option<socklen_t>
) -> Option<Self>where
Self: Sized,
unsafe fn from_raw(
addr: *const sockaddr,
len: Option<socklen_t>
) -> Option<Self>where
Self: Sized,
Unsafe constructor from a variable length source Read more
source§fn as_ptr(&self) -> *const sockaddr
fn as_ptr(&self) -> *const sockaddr
Returns a raw pointer to the inner structure. Useful for FFI.
impl Copy for LinkAddr
impl Eq for LinkAddr
impl StructuralPartialEq for LinkAddr
Auto Trait Implementations§
impl Freeze for LinkAddr
impl RefUnwindSafe for LinkAddr
impl Send for LinkAddr
impl Sync for LinkAddr
impl Unpin for LinkAddr
impl UnwindSafe for LinkAddr
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