Struct konst::parsing::ParseError[][src]

pub struct ParseError<'a> { /* fields omitted */ }
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]

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]

impl<'a> StructuralEq for ParseError<'a>[src]

impl<'a> StructuralPartialEq for ParseError<'a>[src]

Auto Trait Implementations

impl<'a> Send for ParseError<'a>

impl<'a> Sync for ParseError<'a>

impl<'a> Unpin for ParseError<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.