Struct mutnet::error::InvalidChecksumError
source · pub struct InvalidChecksumError {
pub calculated_checksum: u16,
}
Expand description
Error returned if the calculated checksum does not match the expected one.
This is generally the case when the checksum calculated for IPv4 or UDP/TCP is not 0.
Fields§
§calculated_checksum: u16
Result of the checksum calculation.
Trait Implementations§
source§impl Clone for InvalidChecksumError
impl Clone for InvalidChecksumError
source§fn clone(&self) -> InvalidChecksumError
fn clone(&self) -> InvalidChecksumError
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 InvalidChecksumError
impl Debug for InvalidChecksumError
source§impl Display for InvalidChecksumError
impl Display for InvalidChecksumError
source§impl Error for InvalidChecksumError
impl Error for InvalidChecksumError
1.30.0 · 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<InvalidChecksumError> for ParseIpv4Error
impl From<InvalidChecksumError> for ParseIpv4Error
source§fn from(value: InvalidChecksumError) -> Self
fn from(value: InvalidChecksumError) -> Self
Converts to this type from the input type.
source§impl From<InvalidChecksumError> for ParseTcpError
impl From<InvalidChecksumError> for ParseTcpError
source§fn from(value: InvalidChecksumError) -> Self
fn from(value: InvalidChecksumError) -> Self
Converts to this type from the input type.
source§impl From<InvalidChecksumError> for ParseUdpError
impl From<InvalidChecksumError> for ParseUdpError
source§fn from(value: InvalidChecksumError) -> Self
fn from(value: InvalidChecksumError) -> Self
Converts to this type from the input type.
source§impl Hash for InvalidChecksumError
impl Hash for InvalidChecksumError
source§impl Ord for InvalidChecksumError
impl Ord for InvalidChecksumError
source§fn cmp(&self, other: &InvalidChecksumError) -> Ordering
fn cmp(&self, other: &InvalidChecksumError) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for InvalidChecksumError
impl PartialEq for InvalidChecksumError
source§fn eq(&self, other: &InvalidChecksumError) -> bool
fn eq(&self, other: &InvalidChecksumError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for InvalidChecksumError
impl PartialOrd for InvalidChecksumError
source§fn partial_cmp(&self, other: &InvalidChecksumError) -> Option<Ordering>
fn partial_cmp(&self, other: &InvalidChecksumError) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for InvalidChecksumError
impl Eq for InvalidChecksumError
impl StructuralPartialEq for InvalidChecksumError
Auto Trait Implementations§
impl Freeze for InvalidChecksumError
impl RefUnwindSafe for InvalidChecksumError
impl Send for InvalidChecksumError
impl Sync for InvalidChecksumError
impl Unpin for InvalidChecksumError
impl UnwindSafe for InvalidChecksumError
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