Struct gramma::parse::ParseError
source · pub struct ParseError<'src> {
pub location: Location,
pub actual: &'src str,
pub expected: Vec<ExpectedParse>,
pub error_rule_location: Option<Location>,
}
Fields§
§location: Location
§actual: &'src str
§expected: Vec<ExpectedParse>
§error_rule_location: Option<Location>
Implementations§
source§impl ParseError<'_>
impl ParseError<'_>
pub fn add_expected( &mut self, location: Location, expected_parse: ExpectedParse )
pub fn set_location(&mut self, location: Location)
pub fn clear(&mut self)
pub fn expected(&self) -> impl Iterator<Item = ExpectedParse> + '_
Trait Implementations§
source§impl<'src> Clone for ParseError<'src>
impl<'src> Clone for ParseError<'src>
source§fn clone(&self) -> ParseError<'src>
fn clone(&self) -> ParseError<'src>
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<'src> Debug for ParseError<'src>
impl<'src> Debug for ParseError<'src>
source§impl<'src> Default for ParseError<'src>
impl<'src> Default for ParseError<'src>
source§fn default() -> ParseError<'src>
fn default() -> ParseError<'src>
Returns the “default value” for a type. Read more
source§impl<'src> Hash for ParseError<'src>
impl<'src> Hash for ParseError<'src>
source§impl<'src> Ord for ParseError<'src>
impl<'src> Ord for ParseError<'src>
source§fn cmp(&self, other: &ParseError<'src>) -> Ordering
fn cmp(&self, other: &ParseError<'src>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<'src> PartialEq for ParseError<'src>
impl<'src> PartialEq for ParseError<'src>
source§fn eq(&self, other: &ParseError<'src>) -> bool
fn eq(&self, other: &ParseError<'src>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'src> PartialOrd for ParseError<'src>
impl<'src> PartialOrd for ParseError<'src>
source§fn partial_cmp(&self, other: &ParseError<'src>) -> Option<Ordering>
fn partial_cmp(&self, other: &ParseError<'src>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<'src> Eq for ParseError<'src>
impl<'src> StructuralPartialEq for ParseError<'src>
Auto Trait Implementations§
impl<'src> Freeze for ParseError<'src>
impl<'src> RefUnwindSafe for ParseError<'src>
impl<'src> Send for ParseError<'src>
impl<'src> Sync for ParseError<'src>
impl<'src> Unpin for ParseError<'src>
impl<'src> UnwindSafe for ParseError<'src>
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