Enum fxt::ParseError
source · 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)>
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 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
positionsition and an [ErrorKind]. This is useful when backtracking
through a parse tree, accumulating error context on the way
§fn from_char(input: I, _: char) -> Self
fn from_char(input: I, _: char) -> Self
creates an error from an input position and an expected character
§fn or(self, other: Self) -> Self
fn or(self, other: Self) -> Self
combines two existing error. This function is used to compare errors
generated in various branches of [alt]
§fn add_context(_input: I, _ctx: &'static str, other: Self) -> Self
fn add_context(_input: I, _ctx: &'static str, other: Self) -> Self
create a new error from an input position, a static string and an existing error.
This is used mainly in the [context] combinator, to add user friendly information
to errors when backtracking through a parse tree
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