pub enum ParseError {
ValueOutOfValidRange,
Unsupported,
Nom(ErrorKind),
Incomplete(Needed),
}
Expand description
Errors which occur when interacting with streams of diagnostic records.
Variants§
ValueOutOfValidRange
We attempted to parse bytes as a type for which the bytes are not a valid pattern.
Unsupported
We attempted to parse or encode values which are not yet supported by this implementation of the Fuchsia Tracing format.
Nom(ErrorKind)
We encountered a generic nom
error while parsing.
Incomplete(Needed)
We failed to parse a complete item.
Trait Implementations§
source§impl Clone for ParseError
impl Clone for ParseError
source§fn clone(&self) -> ParseError
fn clone(&self) -> ParseError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§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
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 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