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 errors 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> Clone for ParseError<'a>
impl<'a> Clone for ParseError<'a>
Source§fn clone(&self) -> ParseError<'a>
fn clone(&self) -> ParseError<'a>
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<'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)>
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<'a> From<ParseError<'a>> for GraphFromFileError<'a>
impl<'a> From<ParseError<'a>> for GraphFromFileError<'a>
Source§fn from(e: ParseError<'a>) -> Self
fn from(e: ParseError<'a>) -> Self
Converts to this type from the input type.
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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