pub struct EthernetAddress { /* private fields */ }Expand description
An ethernet address, which is a mac address together with an ethertype and interface index.
Implementations§
Source§impl EthernetAddress
impl EthernetAddress
Sourcepub const fn new(
protocol: u16,
mac_address: MacAddress,
if_index: c_int,
) -> Self
pub const fn new( protocol: u16, mac_address: MacAddress, if_index: c_int, ) -> Self
Create an ethernet address from its raw components.
Sourcepub const fn mac(&self) -> MacAddress
pub const fn mac(&self) -> MacAddress
The mac address portion of the ethernet address.
Trait Implementations§
Source§impl Clone for EthernetAddress
impl Clone for EthernetAddress
impl Copy for EthernetAddress
Source§impl Debug for EthernetAddress
impl Debug for EthernetAddress
impl Eq for EthernetAddress
Source§impl Hash for EthernetAddress
impl Hash for EthernetAddress
impl MulticastJoinable for EthernetAddress
impl NetworkAddress for EthernetAddress
Source§impl PartialEq for EthernetAddress
impl PartialEq for EthernetAddress
impl StructuralPartialEq for EthernetAddress
Auto Trait Implementations§
impl Forget for EthernetAddress
impl Freeze for EthernetAddress
impl Move for EthernetAddress
impl RefUnwindSafe for EthernetAddress
impl Send for EthernetAddress
impl Sync for EthernetAddress
impl Unpin for EthernetAddress
impl UnsafeUnpin for EthernetAddress
impl UnwindSafe for EthernetAddress
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