Struct konst::parsing::ParseError
source · 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>
source§fn eq(&self, other: &ParseError<'a>) -> bool
fn eq(&self, other: &ParseError<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)