[][src]Enum full_moon::ast::AstError

pub enum AstError<'a> {
    Empty,
    NoEof,
    UnexpectedToken {
        token: Token<'a>,
        additional: Option<Cow<'a, str>>,
    },
}

An error that occurs when creating the ast after tokenizing

Variants

Empty

There were no tokens passed, which shouldn't happen normally

NoEof

Tokens passed had no end of file token, which shouldn't happen normally

UnexpectedToken

An unexpected token, the most likely scenario when getting an AstError

Fields of UnexpectedToken

token: Token<'a>

The token that caused the error

additional: Option<Cow<'a, str>>

Any additional information that could be provided for debugging

Trait Implementations

impl<'a> Clone for AstError<'a>[src]

impl<'a> Debug for AstError<'a>[src]

impl<'de: 'a, 'a> Deserialize<'de> for AstError<'a>[src]

impl<'a> Display for AstError<'a>[src]

impl<'a> Error for AstError<'a>[src]

impl<'_> Owned for AstError<'_>[src]

type Owned = AstError<'static>

What an owned version of the object looks like. Usually contains a 'static lifetime.

impl<'a> PartialEq<AstError<'a>> for AstError<'a>[src]

impl<'a> Serialize for AstError<'a>[src]

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

Auto Trait Implementations

impl<'a> RefUnwindSafe for AstError<'a>

impl<'a> Send for AstError<'a>

impl<'a> Sync for AstError<'a>

impl<'a> Unpin for AstError<'a>

impl<'a> UnwindSafe for AstError<'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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.