Enum etherparse::IpHeader
[−]
[src]
pub enum IpHeader { Version4(Ipv4Header), Version6(Ipv6Header), }
Internet protocol headers version 4 & 6
Variants
Version4(Ipv4Header)
Version6(Ipv6Header)
Methods
impl IpHeader
[src]
pub fn read<T: Read + Seek + Sized>(
reader: &mut T
) -> Result<IpHeader, ReadError>
[src]
reader: &mut T
) -> Result<IpHeader, ReadError>
Reads an IP (v4 or v6) header from the current position.
pub fn write<T: Write + Sized>(&self, writer: &mut T) -> Result<(), WriteError>
[src]
Writes an IP (v4 or v6) header to the current position
Trait Implementations
impl Clone for IpHeader
[src]
fn clone(&self) -> IpHeader
[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
impl Debug for IpHeader
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more