Enum etherparse::err::ipv6_exts::ExtPayloadLenError
source · pub enum ExtPayloadLenError {
TooSmall(usize),
TooBig(usize),
Unaligned(usize),
}
Expand description
Error when creating an crate::Ipv6RawExtHeader
and the
payload len is non representable.
Variants§
TooSmall(usize)
Error when the payload length is smaller then
crate::Ipv6RawExtHeader::MIN_PAYLOAD_LEN
(6).
TooBig(usize)
Error when the payload length is bigger then
crate::Ipv6RawExtHeader::MAX_PAYLOAD_LEN
(2046).
Unaligned(usize)
Error when the payload length can not be represented
as a multiple of 8-bytes in the extension header
(0 == (payload.len() + 2) % 8
is not fulfilled).
Trait Implementations§
source§impl Clone for ExtPayloadLenError
impl Clone for ExtPayloadLenError
source§fn clone(&self) -> ExtPayloadLenError
fn clone(&self) -> ExtPayloadLenError
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 ExtPayloadLenError
impl Debug for ExtPayloadLenError
source§impl Display for ExtPayloadLenError
impl Display for ExtPayloadLenError
source§impl Error for ExtPayloadLenError
Available on crate feature std
only.
impl Error for ExtPayloadLenError
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 Hash for ExtPayloadLenError
impl Hash for ExtPayloadLenError
source§impl PartialEq for ExtPayloadLenError
impl PartialEq for ExtPayloadLenError
source§fn eq(&self, other: &ExtPayloadLenError) -> bool
fn eq(&self, other: &ExtPayloadLenError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ExtPayloadLenError
impl StructuralPartialEq for ExtPayloadLenError
Auto Trait Implementations§
impl Freeze for ExtPayloadLenError
impl RefUnwindSafe for ExtPayloadLenError
impl Send for ExtPayloadLenError
impl Sync for ExtPayloadLenError
impl Unpin for ExtPayloadLenError
impl UnwindSafe for ExtPayloadLenError
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