Enum dot_parser::ast::ParseError
source · pub enum ParseError<'a> {
ExpectRule {
expect: Vec<Rule>,
found: Rule,
},
MissingPair {
parent: Pair<'a, Rule>,
expect: Vec<Rule>,
},
}
Expand description
This enum type contains errors that can occur when using a DotParser. In principle, those errors should never occur, as all parsing error should be caught by DotParser::parse. Therefore, if such error occurs, it is a bug, probably a missing feature.
Variants§
ExpectRule
This variant represents the case where we expect one of several rules, but we actually find another.
MissingPair
This variant represents the case where we expect a Pair
but none is present.
Trait Implementations§
source§impl<'a> Debug for ParseError<'a>
impl<'a> Debug for ParseError<'a>
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()
Auto Trait Implementations§
impl<'a> Freeze for ParseError<'a>
impl<'a> RefUnwindSafe for ParseError<'a>
impl<'a> !Send for ParseError<'a>
impl<'a> !Sync for ParseError<'a>
impl<'a> Unpin for ParseError<'a>
impl<'a> UnwindSafe for ParseError<'a>
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more