pub enum PcapValidationError {
InvalidMagicNumber(u32),
TsFracMicroTooBig(u32),
TsFracNanoTooBig(u32),
TimestampTooBig(Duration),
IncludedLenTooBig(u32, u32),
OriginLenTooSmall(u32, u32),
DataTooBig(usize),
PacketLenTooBig(u32, u32),
}Expand description
Errors that can occur while validating a pcap file.
Variants§
InvalidMagicNumber(u32)
The magic number of the pcap header is invalid.
TsFracMicroTooBig(u32)
The fractional timestamp part is too large for microsecond resolution.
TsFracNanoTooBig(u32)
The fractional timestamp part is too large for nanosecond resolution.
TimestampTooBig(Duration)
The timestamp is too large to be represented in a 32-bit seconds field.
IncludedLenTooBig(u32, u32)
The captured packet length is larger than the file snaplen.
OriginLenTooSmall(u32, u32)
The original packet length is smaller than the captured packet length.
DataTooBig(usize)
The packet data length is larger than u32::MAX.
PacketLenTooBig(u32, u32)
The packet length is larger than the file snaplen.
Trait Implementations§
Source§impl Debug for PcapValidationError
impl Debug for PcapValidationError
Source§impl Display for PcapValidationError
impl Display for PcapValidationError
Source§impl Error for PcapValidationError
impl Error for PcapValidationError
1.30.0 · 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<PcapValidationError> for PcapError
impl From<PcapValidationError> for PcapError
Source§fn from(source: PcapValidationError) -> Self
fn from(source: PcapValidationError) -> Self
Converts to this type from the input type.
Source§impl From<PcapValidationError> for PcapParseError
impl From<PcapValidationError> for PcapParseError
Source§fn from(source: PcapValidationError) -> Self
fn from(source: PcapValidationError) -> Self
Converts to this type from the input type.
Source§impl From<PcapValidationError> for PcapReadError
impl From<PcapValidationError> for PcapReadError
Source§fn from(source: PcapValidationError) -> Self
fn from(source: PcapValidationError) -> Self
Converts to this type from the input type.
Source§impl From<PcapValidationError> for PcapWriteError
impl From<PcapValidationError> for PcapWriteError
Source§fn from(source: PcapValidationError) -> Self
fn from(source: PcapValidationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Forget for PcapValidationError
impl Freeze for PcapValidationError
impl Move for PcapValidationError
impl RefUnwindSafe for PcapValidationError
impl Send for PcapValidationError
impl Sync for PcapValidationError
impl Unpin for PcapValidationError
impl UnsafeUnpin for PcapValidationError
impl UnwindSafe for PcapValidationError
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