[−][src]Struct netproto::frames::EthernetFrame
Fields
dst_mac: MacAddress
src_mac: MacAddress
eth_type: EtherType
payload: &'p [u8]
Methods
impl<'p> EthernetFrame<'p>
[src]
pub fn new(bytes: &[u8]) -> EthernetFrame
[src]
Produces a new EthernetFrame
pub fn as_string(&self) -> String
[src]
Returns the string representation of an EthernetFrame
pub fn eth_type(&self) -> &EtherType
[src]
Returns the EtherType contained in an EthernetFrame
pub fn payload(&self) -> &[u8]
[src]
Returns the payload contained in an EthernetFrame
Auto Trait Implementations
impl<'p> Send for EthernetFrame<'p>
impl<'p> Sync for EthernetFrame<'p>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,