pub struct EthernetFrame<'p> {
pub dst_mac: MacAddress,
pub src_mac: MacAddress,
pub eth_type: EtherType,
pub payload: &'p [u8],
}
Fields§
§dst_mac: MacAddress
§src_mac: MacAddress
§eth_type: EtherType
§payload: &'p [u8]
Implementations§
Source§impl<'p> EthernetFrame<'p>
impl<'p> EthernetFrame<'p>
Sourcepub fn new(bytes: &[u8]) -> EthernetFrame<'_>
pub fn new(bytes: &[u8]) -> EthernetFrame<'_>
Produces a new EthernetFrame
Auto Trait Implementations§
impl<'p> Freeze for EthernetFrame<'p>
impl<'p> RefUnwindSafe for EthernetFrame<'p>
impl<'p> Send for EthernetFrame<'p>
impl<'p> Sync for EthernetFrame<'p>
impl<'p> Unpin for EthernetFrame<'p>
impl<'p> UnwindSafe for EthernetFrame<'p>
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