Enum etherparse::err::ipv4::HeaderReadError
source · pub enum HeaderReadError {
Io(Error),
Content(HeaderError),
}
Available on crate feature
std
only.Expand description
Error when decoding an IPv4 header via a std::io::Read
source.
Variants§
Io(Error)
IO error was encountered while reading header.
Content(HeaderError)
Error caused by the contents of the header.
Implementations§
source§impl HeaderReadError
impl HeaderReadError
sourcepub fn io_error(self) -> Option<Error>
pub fn io_error(self) -> Option<Error>
Returns the std::io::Error
value if the HeaderReadError
is Io
.
Otherwise None
is returned.
sourcepub fn content_error(self) -> Option<HeaderError>
pub fn content_error(self) -> Option<HeaderError>
Returns the err::ipv4::HeaderError
value if the HeaderReadError
is Content
.
Otherwise None
is returned.
Trait Implementations§
source§impl Debug for HeaderReadError
impl Debug for HeaderReadError
source§impl Display for HeaderReadError
impl Display for HeaderReadError
source§impl Error for HeaderReadError
impl Error for HeaderReadError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<HeaderReadError> for ReadError
impl From<HeaderReadError> for ReadError
source§fn from(value: HeaderReadError) -> Self
fn from(value: HeaderReadError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for HeaderReadError
impl !RefUnwindSafe for HeaderReadError
impl Send for HeaderReadError
impl Sync for HeaderReadError
impl Unpin for HeaderReadError
impl !UnwindSafe for HeaderReadError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more