Struct smoltcp::wire::Ipv4Repr
[−]
[src]
pub struct Ipv4Repr { pub src_addr: Address, pub dst_addr: Address, pub protocol: Protocol, pub payload_len: usize, }
A high-level representation of an Internet Protocol version 4 packet header.
Fields
src_addr: Address
dst_addr: Address
protocol: Protocol
payload_len: usize
Methods
impl Repr
[src]
fn parse<T: AsRef<[u8]> + ?Sized>(packet: &Packet<&T>) -> Result<Repr>
[src]
Parse an Internet Protocol version 4 packet and return a high-level representation.
fn buffer_len(&self) -> usize
[src]
Return the length of a header that will be emitted from this high-level representation.
fn emit<T: AsRef<[u8]> + AsMut<[u8]>>(&self, packet: &mut Packet<T>)
[src]
Emit a high-level representation into an Internet Protocol version 4 packet.
Trait Implementations
impl Debug for Repr
[src]
impl PartialEq for Repr
[src]
fn eq(&self, __arg_0: &Repr) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Repr) -> bool
[src]
This method tests for !=
.
impl Eq for Repr
[src]
impl Clone for Repr
[src]
fn clone(&self) -> Repr
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more