Struct chomp::parsers::Error [] [src]

pub struct Error<I>(_);

Common error for the basic Chomp parsers.

This is the common error for the basic Chomp parsers. It will contain information about what a parser expected or if it encountered something unexpected (in the case of user supplied predicates, eg. satisfy).

This is coupled with the state found in the error state of the ParseResult type.

Methods

impl<I> Error<I>
[src]

Creates a new Unexpected error.

Should be used when the error value is not important.

Creates a new Unexpected error.

Should be used when the token was unexpected, as in the case of satisfy where a user provided predicate is provided.

Creates a new Expected error.

Should be used when a specific token was expected.

Returns Some(&I) if a specific token was expected, None otherwise.

Trait Implementations

impl<I: Clone> Clone for Error<I>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<I: Debug> Debug for Error<I>
[src]

Formats the value using the given formatter.

impl<I: Eq> Eq for Error<I>
[src]

impl<I: PartialEq> PartialEq for Error<I>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<I: Ord> Ord for Error<I>
[src]

This method returns an Ordering between self and other. Read more

impl<I: PartialOrd> PartialOrd for Error<I>
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<I: Hash> Hash for Error<I>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<I> Display for Error<I> where
    I: Debug
[src]

Formats the value using the given formatter. Read more

impl<I: Any + Debug> Error for Error<I>
[src]

A short description of the error. Read more

The lower-level cause of this error, if any. Read more