pub struct ParseError<'a> { /* private fields */ }
Expand description
Implementations§
Source§impl<'a> ParseError<'a>
impl<'a> ParseError<'a>
Sourcepub const fn other_error(
parser: Parser<'a>,
extra_message: &'static &'static str,
) -> Self
pub const fn other_error( parser: Parser<'a>, extra_message: &'static &'static str, ) -> Self
Constructs a ParseError
for an ErrorKind::Other
error with
a customized error message.
Sourcepub const fn offset(&self) -> usize
pub const fn offset(&self) -> usize
Gets the byte offset of this error in the parsed string that the
Parser
was constructed from.
Sourcepub const fn error_direction(&self) -> ParseDirection
pub const fn error_direction(&self) -> ParseDirection
The direction that this error happened from, either from the start or the end.
Sourcepub const fn panic(&self) -> !
pub const fn panic(&self) -> !
For panicking with an error message,
this is called by the unwrap_ctx
macro.
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<'a> Display for ParseError<'a>
impl<'a> Display for ParseError<'a>
Source§impl<'a> PartialEq for ParseError<'a>
impl<'a> PartialEq for ParseError<'a>
impl<'a> Eq for ParseError<'a>
impl<'a> StructuralPartialEq 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