Enum jexl_parser::ParseError
source · [−]pub enum ParseError<L, T, E> {
InvalidToken {
location: L,
},
UnrecognizedEOF {
location: L,
expected: Vec<String, Global>,
},
UnrecognizedToken {
token: (L, T, L),
expected: Vec<String, Global>,
},
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.
UnrecognizedEOF
Fields
Generated by the parser when it encounters an EOF it did not expect.
UnrecognizedToken
Fields
Generated by the parser when it encounters a token it did not expect.
ExtraToken
Generated by the parser when it encounters additional, unexpected tokens.
User
Custom error type.
Implementations
sourceimpl<L, T, E> ParseError<L, T, E>
impl<L, T, E> ParseError<L, T, E>
pub fn map_location<LL>(self, op: impl FnMut(L) -> LL) -> ParseError<LL, T, E>
pub fn map_token<TT>(self, op: impl FnOnce(T) -> TT) -> ParseError<L, TT, E>
pub fn map_error<EE>(self, op: impl FnOnce(E) -> EE) -> ParseError<L, T, EE>
Trait Implementations
sourceimpl<L, T, E> Clone for ParseError<L, T, E> where
L: Clone,
T: Clone,
E: Clone,
impl<L, T, E> Clone for ParseError<L, T, E> where
L: Clone,
T: Clone,
E: Clone,
sourcefn clone(&self) -> ParseError<L, T, E>
fn clone(&self) -> ParseError<L, T, E>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<L, T, E> Error for ParseError<L, T, E> where
L: Debug + Display,
T: Debug + Display,
E: Debug + Display,
impl<L, T, E> Error for ParseError<L, T, E> where
L: Debug + Display,
T: Debug + Display,
E: Debug + Display,
sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourceimpl<L, T, E> From<E> for ParseError<L, T, E>
impl<L, T, E> From<E> for ParseError<L, T, E>
sourcefn from(error: E) -> ParseError<L, T, E>
fn from(error: E) -> ParseError<L, T, E>
Converts to this type from the input type.
sourceimpl<L, T, E> Ord for ParseError<L, T, E> where
L: Ord,
T: Ord,
E: Ord,
impl<L, T, E> Ord for ParseError<L, T, E> where
L: Ord,
T: Ord,
E: Ord,
sourceimpl<L, T, E> PartialEq<ParseError<L, T, E>> for ParseError<L, T, E> where
L: PartialEq<L>,
T: PartialEq<T>,
E: PartialEq<E>,
impl<L, T, E> PartialEq<ParseError<L, T, E>> for ParseError<L, T, E> where
L: PartialEq<L>,
T: PartialEq<T>,
E: PartialEq<E>,
sourcefn eq(&self, other: &ParseError<L, T, E>) -> bool
fn eq(&self, other: &ParseError<L, T, E>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ParseError<L, T, E>) -> bool
fn ne(&self, other: &ParseError<L, T, E>) -> bool
This method tests for !=
.
sourceimpl<L, T, E> PartialOrd<ParseError<L, T, E>> for ParseError<L, T, E> where
L: PartialOrd<L>,
T: PartialOrd<T>,
E: PartialOrd<E>,
impl<L, T, E> PartialOrd<ParseError<L, T, E>> for ParseError<L, T, E> where
L: PartialOrd<L>,
T: PartialOrd<T>,
E: PartialOrd<E>,
sourcefn partial_cmp(&self, other: &ParseError<L, T, E>) -> Option<Ordering>
fn partial_cmp(&self, other: &ParseError<L, T, E>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<L, T, E> Eq for ParseError<L, T, E> where
L: Eq,
T: Eq,
E: Eq,
impl<L, T, E> StructuralEq for ParseError<L, T, E>
impl<L, T, E> StructuralPartialEq for ParseError<L, T, E>
Auto Trait Implementations
impl<L, T, E> RefUnwindSafe for ParseError<L, T, E> where
E: RefUnwindSafe,
L: RefUnwindSafe,
T: RefUnwindSafe,
impl<L, T, E> Send for ParseError<L, T, E> where
E: Send,
L: Send,
T: Send,
impl<L, T, E> Sync for ParseError<L, T, E> where
E: Sync,
L: Sync,
T: Sync,
impl<L, T, E> Unpin for ParseError<L, T, E> where
E: Unpin,
L: Unpin,
T: Unpin,
impl<L, T, E> UnwindSafe for ParseError<L, T, E> where
E: UnwindSafe,
L: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more