#[non_exhaustive]
pub enum ArpRepr {
EthernetIpv4 {
operation: Operation,
source_hardware_addr: EthernetAddress,
source_protocol_addr: Ipv4Address,
target_hardware_addr: EthernetAddress,
target_protocol_addr: Ipv4Address,
},
}Expand description
A high-level representation of an Address Resolution Protocol packet.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
EthernetIpv4
Fields
operation: Operationsource_hardware_addr: EthernetAddresssource_protocol_addr: Ipv4Addresstarget_hardware_addr: EthernetAddresstarget_protocol_addr: Ipv4AddressAn Ethernet and IPv4 Address Resolution Protocol packet.
Implementations
sourceimpl Repr
impl Repr
sourcepub fn parse<T: AsRef<[u8]>>(packet: &Packet<T>) -> Result<Repr>
pub fn parse<T: AsRef<[u8]>>(packet: &Packet<T>) -> Result<Repr>
Parse an Address Resolution Protocol packet and return a high-level representation,
or return Err(Error::Unrecognized) if the packet is not recognized.
sourcepub fn buffer_len(&self) -> usize
pub fn buffer_len(&self) -> usize
Return the length of a packet that will be emitted from this high-level representation.
Trait Implementations
impl Copy for Repr
impl Eq for Repr
impl StructuralEq for Repr
impl StructuralPartialEq for Repr
Auto Trait Implementations
impl RefUnwindSafe for Repr
impl Send for Repr
impl Sync for Repr
impl Unpin for Repr
impl UnwindSafe for Repr
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more