[][src]Enum hinku::ParseError

pub enum ParseError<E> {
    EndOfStream,
    UnexpectedToken {
        span: Span,
    },
    Custom {
        span: Span,
        error: Vec<E>,
    },
}

Represents a parsing error.

Variants

EndOfStream

The end of the stream was reached unexpectedly.

UnexpectedToken

An unexpected token was encountered.

Fields of UnexpectedToken

span: Span

Span of the unexpected token.

Custom

An user-defined error occurred.

Fields of Custom

span: Span

Part of the input that caused the error.

error: Vec<E>

List of error context. The first element is "deeper" into the parser and the last more "general."

Implementations

impl<E> ParseError<E>[src]

pub fn custom(span: Span, error: E) -> ParseError<E>[src]

A convinience function for creating a ParseError::Custom variant.

Trait Implementations

impl<E: Debug> Debug for ParseError<E>[src]

impl<E: PartialEq> PartialEq<ParseError<E>> for ParseError<E>[src]

impl<E> StructuralPartialEq for ParseError<E>[src]

Auto Trait Implementations

impl<E> RefUnwindSafe for ParseError<E> where
    E: RefUnwindSafe

impl<E> Send for ParseError<E> where
    E: Send

impl<E> Sync for ParseError<E> where
    E: Sync

impl<E> Unpin for ParseError<E> where
    E: Unpin

impl<E> UnwindSafe for ParseError<E> where
    E: UnwindSafe

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, 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.