pub enum ReadError {
Io(Error),
Len(LenError),
Macsec(HeaderError),
Ip(HeaderError),
IpAuth(HeaderError),
Ipv4(HeaderError),
Ipv6(HeaderError),
Ipv6Exts(HeaderError),
LinuxSll(HeaderError),
Tcp(HeaderError),
}std only.Expand description
“Catch all” error for all from_slice or read errors (supports automatic conversion from all
other slice errors).
This type aggregates all errors that can be caused by decoding from a slice or reading from an io stream.
This type can be used as a “catch all” type for errors caused by from_slice or
read functions as all errors from these functions can be converted into this type.
Variants§
Io(Error)
IO error was encountered while reading header or expected packet contents.
Len(LenError)
Error when parsing had to be aborted because of a length error (usually not enough data being available).
Macsec(HeaderError)
Error when decoding MACsec header.
Ip(HeaderError)
Error while parsing a IP header.
IpAuth(HeaderError)
Error while parsing a IP authentication header.
Ipv4(HeaderError)
Error while parsing a IPv4 header.
Ipv6(HeaderError)
Error while parsing a IPv6 header.
Ipv6Exts(HeaderError)
Error while parsing a IPv6 extension header.
LinuxSll(HeaderError)
Error while parsing a Linux Cooked Capture v1 (SLL)
Tcp(HeaderError)
Error while parsing a TCP extension header.
Implementations§
Source§impl ReadError
impl ReadError
pub fn io(&self) -> Option<&Error>
pub fn len(&self) -> Option<&LenError>
pub fn macsec(&self) -> Option<&HeaderError>
pub fn ip(&self) -> Option<&HeaderError>
pub fn ip_auth(&self) -> Option<&HeaderError>
pub fn ipv4(&self) -> Option<&HeaderError>
pub fn ipv6(&self) -> Option<&HeaderError>
pub fn ipv6_exts(&self) -> Option<&HeaderError>
pub fn linux_sll(&self) -> Option<&HeaderError>
pub fn tcp(&self) -> Option<&HeaderError>
Trait Implementations§
Source§impl Error for ReadError
impl Error for ReadError
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()