Struct netstack3_core::device::EthernetDeviceId
source · pub struct EthernetDeviceId<C: DeviceLayerTypes>(/* private fields */);
Expand description
A strong device ID identifying an ethernet device.
This device ID is like DeviceId
but specifically for ethernet devices.
Implementations§
source§impl<C: DeviceLayerTypes> EthernetDeviceId<C>
impl<C: DeviceLayerTypes> EthernetDeviceId<C>
sourcepub fn external_state(&self) -> &C::EthernetDeviceState
pub fn external_state(&self) -> &C::EthernetDeviceState
Returns a reference to the external state for the device.
sourcepub fn downgrade(&self) -> EthernetWeakDeviceId<C>
pub fn downgrade(&self) -> EthernetWeakDeviceId<C>
Downgrades the ID to an EthernetWeakDeviceId
.
Trait Implementations§
source§impl<C: DeviceLayerTypes> Clone for EthernetDeviceId<C>
impl<C: DeviceLayerTypes> Clone for EthernetDeviceId<C>
source§impl<C: DeviceLayerTypes> Debug for EthernetDeviceId<C>
impl<C: DeviceLayerTypes> Debug for EthernetDeviceId<C>
source§impl<C: DeviceLayerTypes> From<EthernetDeviceId<C>> for DeviceId<C>
impl<C: DeviceLayerTypes> From<EthernetDeviceId<C>> for DeviceId<C>
source§fn from(id: EthernetDeviceId<C>) -> DeviceId<C>
fn from(id: EthernetDeviceId<C>) -> DeviceId<C>
Converts to this type from the input type.
source§impl<C: DeviceLayerTypes> Hash for EthernetDeviceId<C>
impl<C: DeviceLayerTypes> Hash for EthernetDeviceId<C>
source§impl<C: NonSyncContext<DeviceId<C>> + DeviceLayerEventDispatcher> NonSyncContext<EthernetDeviceId<C>> for C
impl<C: NonSyncContext<DeviceId<C>> + DeviceLayerEventDispatcher> NonSyncContext<EthernetDeviceId<C>> for C
source§fn receive_frame(
&self,
state: &Self::SocketState,
device: &EthernetDeviceId<C>,
frame: Frame<&[u8]>,
whole_frame: &[u8]
)
fn receive_frame( &self, state: &Self::SocketState, device: &EthernetDeviceId<C>, frame: Frame<&[u8]>, whole_frame: &[u8] )
Called for each received frame that matches the provided socket. Read more
source§impl<C: DeviceLayerTypes> Ord for EthernetDeviceId<C>
impl<C: DeviceLayerTypes> Ord for EthernetDeviceId<C>
source§impl<C: DeviceLayerTypes> PartialEq<EthernetDeviceId<C>> for EthernetDeviceId<C>
impl<C: DeviceLayerTypes> PartialEq<EthernetDeviceId<C>> for EthernetDeviceId<C>
source§impl<C: DeviceLayerTypes> PartialEq<EthernetDeviceId<C>> for EthernetWeakDeviceId<C>
impl<C: DeviceLayerTypes> PartialEq<EthernetDeviceId<C>> for EthernetWeakDeviceId<C>
source§fn eq(&self, other: &EthernetDeviceId<C>) -> bool
fn eq(&self, other: &EthernetDeviceId<C>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<C: DeviceLayerTypes> PartialEq<EthernetWeakDeviceId<C>> for EthernetDeviceId<C>
impl<C: DeviceLayerTypes> PartialEq<EthernetWeakDeviceId<C>> for EthernetDeviceId<C>
source§fn eq(&self, EthernetWeakDeviceId: &EthernetWeakDeviceId<C>) -> bool
fn eq(&self, EthernetWeakDeviceId: &EthernetWeakDeviceId<C>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<C: DeviceLayerTypes> PartialOrd<EthernetDeviceId<C>> for EthernetDeviceId<C>
impl<C: DeviceLayerTypes> PartialOrd<EthernetDeviceId<C>> for EthernetDeviceId<C>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<C: DeviceLayerTypes> Eq for EthernetDeviceId<C>
Auto Trait Implementations§
impl<C> RefUnwindSafe for EthernetDeviceId<C>where <C as DeviceLayerStateTypes>::EthernetDeviceState: RefUnwindSafe,
impl<C> Send for EthernetDeviceId<C>
impl<C> Sync for EthernetDeviceId<C>
impl<C> Unpin for EthernetDeviceId<C>
impl<C> UnwindSafe for EthernetDeviceId<C>where <C as DeviceLayerStateTypes>::EthernetDeviceState: RefUnwindSafe,
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