pub enum ParseError {
Nom(ErrorKind, Option<Box<Self>>),
Io(Error),
InvalidUtf8(Utf8Error),
MissingMagicNumber,
WrongType {
expected: u8,
observed: u8,
context: &'static str,
},
InvalidMagicNumber {
observed: u32,
},
InvalidRef,
InvalidSize,
}
Variants§
Nom(ErrorKind, Option<Box<Self>>)
We encountered a generic nom
error while parsing.
Io(Error)
We encountered an error performing I/O to read the trace session.
InvalidUtf8(Utf8Error)
We encountered invalid UTF-8 while parsing.
MissingMagicNumber
We encountered a non-magic-number record at the beginning of the session.
WrongType
We encountered an unexpected type ordinal while parsing.
InvalidMagicNumber
We encountered an incorrect magic number while parsing.
InvalidRef
We encountered an invalid reference, like a zero thread id.
InvalidSize
We encountered an invalid length for a record.
Trait Implementations§
Source§impl Debug for ParseError
impl Debug for ParseError
Source§impl Display for ParseError
impl Display for ParseError
Source§impl Error for ParseError
impl Error for ParseError
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<Utf8Error> for ParseError
impl From<Utf8Error> for ParseError
Source§impl FromExternalError<&[u8], ParseError> for ParseError
impl FromExternalError<&[u8], ParseError> for ParseError
Source§fn from_external_error(_input: &[u8], _kind: ErrorKind, e: ParseError) -> Self
fn from_external_error(_input: &[u8], _kind: ErrorKind, e: ParseError) -> Self
Creates a new error from an input position, an [ErrorKind] indicating the
wrapping parser, and an external error
Source§impl ParseError<&[u8]> for ParseError
impl ParseError<&[u8]> for ParseError
Source§fn from_error_kind(_input: &[u8], kind: ErrorKind) -> Self
fn from_error_kind(_input: &[u8], kind: ErrorKind) -> Self
Creates an error from the input position and an [ErrorKind]
Source§fn append(_input: &[u8], kind: ErrorKind, prev: Self) -> Self
fn append(_input: &[u8], kind: ErrorKind, prev: 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
Auto Trait Implementations§
impl Freeze for ParseError
impl !RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl !UnwindSafe for ParseError
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