Enum pcap_parser::PcapError
source · [−]pub enum PcapError<I: Sized> {
Eof,
ReadError,
Incomplete,
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
ReadError
An error happened during a read
operation
Incomplete
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
sourceimpl<I> Error for PcapError<I> where
I: Debug,
impl<I> Error for PcapError<I> where
I: Debug,
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
🔬 This is a nightly-only experimental API. (
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl<I> ParseError<I> for PcapError<I>
impl<I> ParseError<I> 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more