pub enum PcapParseError {
IO(Error),
InvalidMagicNumber(Option<[u8; 4]>),
InvalidLinkType(InvalidLinkType),
InvalidPacketLength {
snap_length: u32,
incl_len: u32,
},
InvalidVersion,
TryFromSliceError(TryFromSliceError),
UnexpectedSize(UnexpectedSize),
}Expand description
Errors that can occur when parsing or writing pcap files
Variants§
IO(Error)
InvalidMagicNumber(Option<[u8; 4]>)
InvalidLinkType(InvalidLinkType)
InvalidPacketLength
InvalidVersion
TryFromSliceError(TryFromSliceError)
This should never happen. But preventing panics
UnexpectedSize(UnexpectedSize)
Trait Implementations§
Source§impl Debug for PcapParseError
impl Debug for PcapParseError
Source§impl Display for PcapParseError
impl Display for PcapParseError
Source§impl Error for PcapParseError
impl Error for PcapParseError
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<Error> for PcapParseError
impl From<Error> for PcapParseError
Source§impl From<InvalidLinkType> for PcapParseError
impl From<InvalidLinkType> for PcapParseError
Source§fn from(source: InvalidLinkType) -> Self
fn from(source: InvalidLinkType) -> Self
Converts to this type from the input type.
Source§impl From<TryFromSliceError> for PcapParseError
impl From<TryFromSliceError> for PcapParseError
Source§fn from(source: TryFromSliceError) -> Self
fn from(source: TryFromSliceError) -> Self
Converts to this type from the input type.
Source§impl From<UnexpectedSize> for PcapParseError
impl From<UnexpectedSize> for PcapParseError
Source§fn from(source: UnexpectedSize) -> Self
fn from(source: UnexpectedSize) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PcapParseError
impl !RefUnwindSafe for PcapParseError
impl Send for PcapParseError
impl Sync for PcapParseError
impl Unpin for PcapParseError
impl !UnwindSafe for PcapParseError
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