Enum etherparse::err::ipv6_exts::HeaderSliceError
source · pub enum HeaderSliceError {
Len(LenError),
Content(HeaderError),
}
Expand description
Error when decoding IPv6 extension headers from a slice.
Variants§
Len(LenError)
Error when an length error is encountered (e.g. unexpected end of slice).
Content(HeaderError)
Error caused by the contents of the header.
Implementations§
source§impl HeaderSliceError
impl HeaderSliceError
sourcepub const fn add_slice_offset(self, offset: usize) -> Self
pub const fn add_slice_offset(self, offset: usize) -> Self
Adds an offset value to all slice length related fields.
sourcepub fn len_error(&self) -> Option<&LenError>
pub fn len_error(&self) -> Option<&LenError>
Returns the crate::err::LenError
if the error is an Len.
sourcepub fn content(&self) -> Option<&HeaderError>
pub fn content(&self) -> Option<&HeaderError>
Returns the crate::err::ipv6_exts::HeaderError
if the error is an Len.
Trait Implementations§
source§impl Clone for HeaderSliceError
impl Clone for HeaderSliceError
source§fn clone(&self) -> HeaderSliceError
fn clone(&self) -> HeaderSliceError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for HeaderSliceError
impl Debug for HeaderSliceError
source§impl Display for HeaderSliceError
impl Display for HeaderSliceError
source§impl Error for HeaderSliceError
Available on crate feature std
only.
impl Error for HeaderSliceError
Available on crate feature
std
only.source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<HeaderSliceError> for FromSliceError
impl From<HeaderSliceError> for FromSliceError
source§fn from(value: HeaderSliceError) -> Self
fn from(value: HeaderSliceError) -> Self
Converts to this type from the input type.
source§impl From<HeaderSliceError> for ReadError
Available on crate feature std
only.
impl From<HeaderSliceError> for ReadError
Available on crate feature
std
only.source§fn from(value: HeaderSliceError) -> Self
fn from(value: HeaderSliceError) -> Self
Converts to this type from the input type.
source§impl Hash for HeaderSliceError
impl Hash for HeaderSliceError
source§impl PartialEq for HeaderSliceError
impl PartialEq for HeaderSliceError
source§fn eq(&self, other: &HeaderSliceError) -> bool
fn eq(&self, other: &HeaderSliceError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for HeaderSliceError
impl StructuralPartialEq for HeaderSliceError
Auto Trait Implementations§
impl Freeze for HeaderSliceError
impl RefUnwindSafe for HeaderSliceError
impl Send for HeaderSliceError
impl Sync for HeaderSliceError
impl Unpin for HeaderSliceError
impl UnwindSafe for HeaderSliceError
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