Struct konst::parsing::ParseError [−][src]
This is supported on crate feature
parsing_no_proc
only.Error returned by all parsing methods that return Result.
This error type knows where
the error happened,
in what direction
the bytes were being parsed,
and the kind
of error that happened.
Implementations
impl<'a> ParseError<'a>
[src]
pub const fn new(parser: Parser<'a>, kind: ErrorKind) -> Self
[src]
Constructs a ParseError
.
pub const fn copy(&self) -> Self
[src]
A const fn equivalent of a clone method.
pub const fn offset(&self) -> usize
[src]
Gets the byte offset of this error in the parsed bytes that the
Parser
was constructed from.
pub const fn error_direction(&self) -> ParseDirection
[src]
The direction that this error happened from, either from the start or the end.
pub const fn kind(&self) -> ErrorKind
[src]
The kind of parsing error that this is.
pub const fn panic(&self) -> !
[src]
For erroring with an error message,
this is called by the unwrap_ctx
macro.
Trait Implementations
impl<'a> Clone for ParseError<'a>
[src]
fn clone(&self) -> ParseError<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for ParseError<'a>
[src]
impl<'a> Display for ParseError<'a>
[src]
impl<'a> Eq for ParseError<'a>
[src]
impl<'a> PartialEq<ParseError<'a>> for ParseError<'a>
[src]
fn eq(&self, other: &ParseError<'a>) -> bool
[src]
fn ne(&self, other: &ParseError<'a>) -> bool
[src]
impl<'a> StructuralEq for ParseError<'a>
[src]
impl<'a> StructuralPartialEq for ParseError<'a>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,