pub struct ParseError<'a> { /* private fields */ }
Expand description
Error signaling a signature parse failure. The error references the originally parsed string providing convenience methods to inspect where the error occurred.
Implementations§
Source§impl<'a> ParseError<'a>
impl<'a> ParseError<'a>
Sourcepub fn message(&self) -> &str
pub fn message(&self) -> &str
Retrieves the parser error messages revealing what went wrong.
The Display
implementation of ParseError
prints exactly
this (and only this) string.
Sourcepub fn context(&self) -> &str
pub fn context(&self) -> &str
Retrieves the (parse) context in which the error occurred. Useful only for debugging the parser.
Sourcepub fn signature(&self) -> &'a str
pub fn signature(&self) -> &'a str
Retrieves the original, full signature string which failed to parsed and led to this error.
Sourcepub fn unconsumed(&self) -> &'a str
pub fn unconsumed(&self) -> &'a str
Returns the unconsumed portion of the parsed signature string at which the error occurred.
Trait Implementations§
Source§impl<'a> Debug for ParseError<'a>
impl<'a> Debug for ParseError<'a>
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