pub enum BuildWriteError {
Io(Error),
PayloadLen(ValueTooBigError<usize>),
Ipv4Exts(ExtsWalkError),
Ipv6Exts(ExtsWalkError),
Icmpv6InIpv4,
ArpHeaderNotMatch,
}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.
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).
ArpHeaderNotMatch
address size defined in the ARP header does not match the actual size
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.
Trait Implementations§
Source§impl Debug for BuildWriteError
impl Debug for BuildWriteError
Source§impl Display for BuildWriteError
impl Display for BuildWriteError
Source§impl Error for BuildWriteError
impl Error for BuildWriteError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()