pub struct ParseError { /* private fields */ }Expand description
An error that occurs during parsing of expressions.
Implementations§
Source§impl ParseError
impl ParseError
Sourcepub fn new(
kind: ParseErrorKind,
position: CharPosition,
found: impl Display,
expected: impl Display,
hint: Option<Hint>,
) -> Self
pub fn new( kind: ParseErrorKind, position: CharPosition, found: impl Display, expected: impl Display, hint: Option<Hint>, ) -> Self
Constructs a new ParseError with the given information.
Sourcepub fn kind(&self) -> ParseErrorKind
pub fn kind(&self) -> ParseErrorKind
Returns the kind of error that has been found.
Sourcepub fn position(&self) -> CharPosition
pub fn position(&self) -> CharPosition
Returns the position in the input stream, where the error has been found.
Trait Implementations§
Source§impl Clone for ParseError
impl Clone for ParseError
Source§fn clone(&self) -> ParseError
fn clone(&self) -> ParseError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Fail for ParseError
impl Fail for ParseError
Source§fn cause(&self) -> Option<&dyn Fail>
fn cause(&self) -> Option<&dyn Fail>
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
Source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace carried by this failure, if it
carries one. Read moreSource§impl PartialEq for ParseError
impl PartialEq for ParseError
Source§fn eq(&self, other: &ParseError) -> bool
fn eq(&self, other: &ParseError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ParseError
Auto Trait Implementations§
impl Freeze for ParseError
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnsafeUnpin 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