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]
impl IpHeader
pub fn read<T: Read + Seek + Sized>(
reader: &mut T
) -> Result<IpHeader, ReadError>
[src]
pub fn read<T: Read + Seek + Sized>(
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]
pub fn write<T: Write + Sized>(&self, writer: &mut T) -> Result<(), WriteError>
Writes an IP (v4 or v6) header to the current position
Trait Implementations
impl Clone for IpHeader
[src]
impl Clone for IpHeader
fn clone(&self) -> IpHeader
[src]
fn clone(&self) -> IpHeader
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for IpHeader
[src]
impl Debug for IpHeader
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for IpHeader
[src]
impl Eq for IpHeader
impl PartialEq for IpHeader
[src]
impl PartialEq for IpHeader