Enum pcap_parser::PcapError
source · pub enum PcapError<I: Sized> {
Eof,
BufferTooSmall,
UnexpectedEof,
ReadError,
Incomplete(usize),
HeaderNotRecognized,
NomError(I, ErrorKind),
OwnedNomError(Vec<u8>, ErrorKind),
}
Expand description
The error type which is returned when reading a pcap file
Variants§
Eof
No more data available
BufferTooSmall
Buffer capacity is too small, and some full frame cannot be stored
UnexpectedEof
Expected more data but got EOF
ReadError
An error happened during a read
operation
Incomplete(usize)
Last block is incomplete, and no more data available
HeaderNotRecognized
File could not be recognized as Pcap nor Pcap-NG
NomError(I, ErrorKind)
An error encountered during parsing
OwnedNomError(Vec<u8>, ErrorKind)
An error encountered during parsing (owned version)
Implementations§
Trait Implementations§
source§impl<I> Error for PcapError<I>where
I: Debug,
impl<I> Error for PcapError<I>where
I: Debug,
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<I> ParseError<I> for PcapError<I>
impl<I> ParseError<I> for PcapError<I>
source§fn from_error_kind(input: I, kind: ErrorKind) -> Self
fn from_error_kind(input: I, kind: ErrorKind) -> Self
Creates an error from the input position and an ErrorKind
source§fn append(input: I, kind: ErrorKind, _other: Self) -> Self
fn append(input: I, kind: ErrorKind, _other: Self) -> Self
Combines an existing error with a new one created from the input
position and an ErrorKind. This is useful when backtracking
through a parse tree, accumulating error context on the way
source§impl<I: PartialEq + Sized> PartialEq for PcapError<I>
impl<I: PartialEq + Sized> PartialEq for PcapError<I>
impl<I: Sized> StructuralPartialEq for PcapError<I>
Auto Trait Implementations§
impl<I> RefUnwindSafe for PcapError<I>where
I: RefUnwindSafe,
impl<I> Send for PcapError<I>where
I: Send,
impl<I> Sync for PcapError<I>where
I: Sync,
impl<I> Unpin for PcapError<I>where
I: Unpin,
impl<I> UnwindSafe for PcapError<I>where
I: UnwindSafe,
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