Enum mutnet::ipv4::ParseIpv4Error
source · pub enum ParseIpv4Error {
UnexpectedBufferEnd(UnexpectedBufferEndError),
VersionHeaderValueNotFour,
IhlHeaderValueTooSmall {
ihl: usize,
},
PacketShorterThanTotalLengthHeaderValue {
total_length_header: usize,
actual_packet_length: usize,
},
TotalLengthHeaderValueSmallerThanIhlHeaderValue {
total_length_header: usize,
ihl_header_in_bytes: usize,
},
PacketShorterThanIhlHeaderValue {
ihl_header_in_bytes: usize,
actual_packet_length: usize,
},
UnrecognizedInternetProtocolNumber(UnrecognizedInternetProtocolNumberError),
InvalidChecksum(InvalidChecksumError),
}
Expand description
Error returned when parsing an IPv4 header.
Variants§
UnexpectedBufferEnd(UnexpectedBufferEndError)
The data buffer ended unexpectedly.
VersionHeaderValueNotFour
Version header value is not four.
IhlHeaderValueTooSmall
IHL header value is smaller than 5.
PacketShorterThanTotalLengthHeaderValue
Fields
The packet is shorter than the total length header specifies.
TotalLengthHeaderValueSmallerThanIhlHeaderValue
Fields
The total length header value is smaller than the packet length specified by the IHL header.
PacketShorterThanIhlHeaderValue
Fields
The packet is shorter than the length specified by the IHL header.
UnrecognizedInternetProtocolNumber(UnrecognizedInternetProtocolNumberError)
Internet protocol number is recognized.
InvalidChecksum(InvalidChecksumError)
Invalid checksum.
Trait Implementations§
source§impl Clone for ParseIpv4Error
impl Clone for ParseIpv4Error
source§fn clone(&self) -> ParseIpv4Error
fn clone(&self) -> ParseIpv4Error
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 ParseIpv4Error
impl Debug for ParseIpv4Error
source§impl Display for ParseIpv4Error
impl Display for ParseIpv4Error
source§impl Error for ParseIpv4Error
impl Error for ParseIpv4Error
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<LengthExceedsAvailableSpaceError> for ParseIpv4Error
impl From<LengthExceedsAvailableSpaceError> for ParseIpv4Error
source§fn from(value: LengthExceedsAvailableSpaceError) -> Self
fn from(value: LengthExceedsAvailableSpaceError) -> Self
Converts to this type from the input type.
source§impl From<ParseIpv4Error> for ParseNetworkDataError
impl From<ParseIpv4Error> for ParseNetworkDataError
source§fn from(value: ParseIpv4Error) -> Self
fn from(value: ParseIpv4Error) -> Self
Converts to this type from the input type.
source§impl From<UnexpectedBufferEndError> for ParseIpv4Error
impl From<UnexpectedBufferEndError> for ParseIpv4Error
source§fn from(value: UnexpectedBufferEndError) -> Self
fn from(value: UnexpectedBufferEndError) -> Self
Converts to this type from the input type.
source§impl From<UnrecognizedInternetProtocolNumberError> for ParseIpv4Error
impl From<UnrecognizedInternetProtocolNumberError> for ParseIpv4Error
source§fn from(value: UnrecognizedInternetProtocolNumberError) -> Self
fn from(value: UnrecognizedInternetProtocolNumberError) -> Self
Converts to this type from the input type.
source§impl Hash for ParseIpv4Error
impl Hash for ParseIpv4Error
source§impl Ord for ParseIpv4Error
impl Ord for ParseIpv4Error
source§fn cmp(&self, other: &ParseIpv4Error) -> Ordering
fn cmp(&self, other: &ParseIpv4Error) -> 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 ParseIpv4Error
impl PartialEq for ParseIpv4Error
source§fn eq(&self, other: &ParseIpv4Error) -> bool
fn eq(&self, other: &ParseIpv4Error) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ParseIpv4Error
impl PartialOrd for ParseIpv4Error
source§fn partial_cmp(&self, other: &ParseIpv4Error) -> Option<Ordering>
fn partial_cmp(&self, other: &ParseIpv4Error) -> 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 ParseIpv4Error
impl Eq for ParseIpv4Error
impl StructuralPartialEq for ParseIpv4Error
Auto Trait Implementations§
impl Freeze for ParseIpv4Error
impl RefUnwindSafe for ParseIpv4Error
impl Send for ParseIpv4Error
impl Sync for ParseIpv4Error
impl Unpin for ParseIpv4Error
impl UnwindSafe for ParseIpv4Error
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