Enum webidl::ParseError
[−]
[src]
pub enum ParseError<L, T, E> { InvalidToken { location: L, }, UnrecognizedToken { token: Option<(L, T, L)>, expected: Vec<String>, }, ExtraToken { token: (L, T, L), }, User { error: E, }, }
Variants
InvalidToken
Generated by the parser when it encounters a token (or EOF) it did not expect.
Fields of InvalidToken
location: L |
UnrecognizedToken
Generated by the parser when it encounters a token (or EOF) it did not expect.
Fields of UnrecognizedToken
token: Option<(L, T, L)> | If this is |
expected: Vec<String> | The set of expected tokens: these names are taken from the grammar and hence may not necessarily be suitable for presenting to the user. |
ExtraToken
Generated by the parser when it encounters additional, unexpected tokens.
Fields of ExtraToken
token: (L, T, L) |
User
Custom error type.
Fields of User
error: E |
Methods
impl<L, T, E> ParseError<L, T, E>
[src]
pub fn map_location<F, LL>(self, op: F) -> ParseError<LL, T, E> where
F: Fn(L) -> LL,
[src]
F: Fn(L) -> LL,
pub fn map_token<F, TT>(self, op: F) -> ParseError<L, TT, E> where
F: Fn(T) -> TT,
[src]
F: Fn(T) -> TT,
pub fn map_error<F, EE>(self, op: F) -> ParseError<L, T, EE> where
F: Fn(E) -> EE,
[src]
F: Fn(E) -> EE,
Trait Implementations
impl<L, T, E> Ord for ParseError<L, T, E> where
E: Ord,
L: Ord,
T: Ord,
[src]
E: Ord,
L: Ord,
T: Ord,
fn cmp(&self, __arg_0: &ParseError<L, T, E>) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl<L, T, E> PartialOrd<ParseError<L, T, E>> for ParseError<L, T, E> where
E: PartialOrd<E>,
L: PartialOrd<L>,
T: PartialOrd<T>,
[src]
E: PartialOrd<E>,
L: PartialOrd<L>,
T: PartialOrd<T>,
fn partial_cmp(&self, __arg_0: &ParseError<L, T, E>) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &ParseError<L, T, E>) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &ParseError<L, T, E>) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &ParseError<L, T, E>) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &ParseError<L, T, E>) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<L, T, E> Display for ParseError<L, T, E> where
E: Display,
L: Display,
T: Display,
[src]
E: Display,
L: Display,
T: Display,
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl<L, T, E> Eq for ParseError<L, T, E> where
E: Eq,
L: Eq,
T: Eq,
[src]
E: Eq,
L: Eq,
T: Eq,
impl<L, T, E> Error for ParseError<L, T, E> where
E: Debug + Display,
L: Debug + Display,
T: Debug + Display,
[src]
E: Debug + Display,
L: Debug + Display,
T: Debug + Display,
fn description(&self) -> &str
[src]
A short description of the error. Read more
fn cause(&self) -> Option<&Error>
1.0.0[src]
The lower-level cause of this error, if any. Read more
impl<L, T, E> PartialEq<ParseError<L, T, E>> for ParseError<L, T, E> where
E: PartialEq<E>,
L: PartialEq<L>,
T: PartialEq<T>,
[src]
E: PartialEq<E>,
L: PartialEq<L>,
T: PartialEq<T>,
fn eq(&self, __arg_0: &ParseError<L, T, E>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ParseError<L, T, E>) -> bool
[src]
This method tests for !=
.
impl<L, T, E> Clone for ParseError<L, T, E> where
E: Clone,
L: Clone,
T: Clone,
[src]
E: Clone,
L: Clone,
T: Clone,
fn clone(&self) -> ParseError<L, T, E>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<L, T, E> Debug for ParseError<L, T, E> where
E: Debug,
L: Debug,
T: Debug,
[src]
E: Debug,
L: Debug,
T: Debug,
Auto Trait Implementations
impl<L, T, E> Send for ParseError<L, T, E> where
E: Send,
L: Send,
T: Send,
E: Send,
L: Send,
T: Send,
impl<L, T, E> Sync for ParseError<L, T, E> where
E: Sync,
L: Sync,
T: Sync,
E: Sync,
L: Sync,
T: Sync,