Struct netstack3_core::device_socket::EthernetFrame
source · pub struct EthernetFrame<B> {
pub src_mac: Mac,
pub dst_mac: Mac,
pub ethertype: Option<EtherType>,
pub body: B,
}
Expand description
Data from an Ethernet frame.
Fields§
§src_mac: Mac
The source address of the frame.
dst_mac: Mac
The destination address of the frame.
ethertype: Option<EtherType>
The EtherType of the frame, or None
if there was none.
body: B
The body of the frame.
Trait Implementations§
source§impl<B: Clone> Clone for EthernetFrame<B>
impl<B: Clone> Clone for EthernetFrame<B>
source§fn clone(&self) -> EthernetFrame<B>
fn clone(&self) -> EthernetFrame<B>
Returns a copy 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<B: Debug> Debug for EthernetFrame<B>
impl<B: Debug> Debug for EthernetFrame<B>
source§impl<'a> From<EthernetFrame<&'a [u8]>> for EthernetFrame<&'a [u8]>
impl<'a> From<EthernetFrame<&'a [u8]>> for EthernetFrame<&'a [u8]>
source§fn from(frame: EthernetFrame<&'a [u8]>) -> Self
fn from(frame: EthernetFrame<&'a [u8]>) -> Self
Converts to this type from the input type.
source§impl<B: PartialEq> PartialEq for EthernetFrame<B>
impl<B: PartialEq> PartialEq for EthernetFrame<B>
source§fn eq(&self, other: &EthernetFrame<B>) -> bool
fn eq(&self, other: &EthernetFrame<B>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<B: Copy> Copy for EthernetFrame<B>
impl<B: Eq> Eq for EthernetFrame<B>
impl<B> StructuralPartialEq for EthernetFrame<B>
Auto Trait Implementations§
impl<B> Freeze for EthernetFrame<B>where
B: Freeze,
impl<B> RefUnwindSafe for EthernetFrame<B>where
B: RefUnwindSafe,
impl<B> Send for EthernetFrame<B>where
B: Send,
impl<B> Sync for EthernetFrame<B>where
B: Sync,
impl<B> Unpin for EthernetFrame<B>where
B: Unpin,
impl<B> UnwindSafe for EthernetFrame<B>where
B: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
Id: HandleableTimer<CC, BC>,
impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
Id: HandleableTimer<CC, BC>,
source§fn handle_timer(&mut self, bindings_ctx: &mut BC, id: Id)
fn handle_timer(&mut self, bindings_ctx: &mut BC, id: Id)
Handle a timer firing.