Struct InputError
struct InputError<I: Clone> { ... }
Capture input on error
This is useful for testing of generic parsers to ensure the error happens at the right location.
Note: [context][Parser::context] and inner errors (like from Parser::try_map) will be
dropped.
Fields
input: IThe input stream, pointing to the location where the error occurred
Implementations
impl<I: Clone> InputError<I>
fn at(input: I) -> SelfCreates a new basic error
fn map_input<I2: Clone, O: Fn(I) -> I2>(self: Self, op: O) -> InputError<I2>Translate the input type
impl<I> Freeze for InputError<I>
impl<I> RefUnwindSafe for InputError<I>
impl<I> Send for InputError<I>
impl<I> Sync for InputError<I>
impl<I> Unpin for InputError<I>
impl<I> UnsafeUnpin for InputError<I>
impl<I> UnwindSafe for InputError<I>
impl<I: $crate::clone::Clone + Clone> Clone for InputError<I>
fn clone(self: &Self) -> InputError<I>
impl<I: $crate::cmp::Eq + Clone> Eq for InputError<I>
impl<I: $crate::cmp::PartialEq + Clone> PartialEq for InputError<I>
fn eq(self: &Self, other: &InputError<I>) -> bool
impl<I: $crate::fmt::Debug + Clone> Debug for InputError<I>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<I: $crate::marker::Copy + Clone> Copy for InputError<I>
impl<I: Clone + fmt::Display> Display for InputError<I>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<I: Clone> ErrorConvert for InputError<(I, usize)>
fn convert(self: Self) -> InputError<I>
impl<I: Clone> ErrorConvert for InputError<I>
fn convert(self: Self) -> InputError<(I, usize)>
impl<I: Clone> StructuralPartialEq for InputError<I>
impl<I: Clone, E> FromExternalError for InputError<I>
fn from_external_error(input: &I, _e: E) -> SelfCreate a new error from an input position and an external error
impl<I: Stream + Clone> ParserError for InputError<I>
fn from_input(input: &I) -> Selffn into_inner(self: Self) -> Result<<Self as >::Inner, Self>
impl<I: Stream + Clone, C> AddContext for InputError<I>
impl<T> Any for InputError<I>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for InputError<I>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for InputError<I>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for InputError<I>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for InputError<I>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into for InputError<I>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for InputError<I>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for InputError<I>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>