Enum etherparse::err::packet::BuildWriteError
source · pub enum BuildWriteError {
Io(Error),
PayloadLen(ValueTooBigError<usize>),
Ipv4Exts(ExtsWalkError),
Ipv6Exts(ExtsWalkError),
Icmpv6InIpv4,
}
std
only.Expand description
Error while writing packet
Variants§
Io(Error)
IO error while writing packet.
PayloadLen(ValueTooBigError<usize>)
Error if the length of the payload is too big to be representable by the length fields.
Ipv4Exts(ExtsWalkError)
Error if the IPv4 extensions can not be serialized because of internal consistency errors (i.e. a header is never).
Ipv6Exts(ExtsWalkError)
Error if the IPv6 extensions can not be serialized because of internal consistency errors.
Icmpv6InIpv4
Error if ICMPv6 is packaged in an IPv4 packet (it is undefined how to calculate the checksum).
Implementations§
source§impl BuildWriteError
impl BuildWriteError
sourcepub fn io(&self) -> Option<&Error>
pub fn io(&self) -> Option<&Error>
Returns the std::io::Error
value if the BuildWriteError
is an Io
.
Otherwise None
is returned.
sourcepub fn payload_len(&self) -> Option<&ValueTooBigError<usize>>
pub fn payload_len(&self) -> Option<&ValueTooBigError<usize>>
Returns the crate::err::ValueTooBigError
value if the
BuildWriteError
is a PayloadLen
. Otherwise None
is returned.
sourcepub fn ipv4_exts(&self) -> Option<&ExtsWalkError>
pub fn ipv4_exts(&self) -> Option<&ExtsWalkError>
Returns the crate::err::ipv4_exts::ExtsWalkError
value if the
BuildWriteError
is a Ipv4Exts
. Otherwise None
is returned.
sourcepub fn ipv6_exts(&self) -> Option<&ExtsWalkError>
pub fn ipv6_exts(&self) -> Option<&ExtsWalkError>
Returns the crate::err::ipv6_exts::ExtsWalkError
value if the
BuildWriteError
is a Ipv6Exts
. Otherwise None
is returned.
sourcepub fn is_icmpv6_in_ipv4(&self) -> bool
pub fn is_icmpv6_in_ipv4(&self) -> bool
Returns true if the BuildWriteError
is a Icmpv6InIpv4
.