pub struct ContextError<C = StrContext> { /* private fields */ }
Expand description
Accumulate context while backtracking errors
Implementations§
Trait Implementations§
Source§impl<C, I: Stream> AddContext<I, C> for ContextError<C>
impl<C, I: Stream> AddContext<I, C> for ContextError<C>
Source§fn add_context(
self,
_input: &I,
_token_start: &<I as Stream>::Checkpoint,
context: C,
) -> Self
fn add_context( self, _input: &I, _token_start: &<I as Stream>::Checkpoint, context: C, ) -> Self
Append to an existing error custom data Read more
Source§impl<C: Clone> Clone for ContextError<C>
impl<C: Clone> Clone for ContextError<C>
Source§impl<C: Debug> Debug for ContextError<C>
impl<C: Debug> Debug for ContextError<C>
Source§impl<C> Default for ContextError<C>
impl<C> Default for ContextError<C>
Source§impl Display for ContextError<StrContext>
impl Display for ContextError<StrContext>
Source§impl<C> ErrorConvert<ContextError<C>> for ContextError<C>
impl<C> ErrorConvert<ContextError<C>> for ContextError<C>
Source§fn convert(self) -> ContextError<C>
fn convert(self) -> ContextError<C>
Transform to another error type
Source§impl<C, I, E: Error + Send + Sync + 'static> FromExternalError<I, E> for ContextError<C>
impl<C, I, E: Error + Send + Sync + 'static> FromExternalError<I, E> for ContextError<C>
Source§fn from_external_error(_input: &I, _kind: ErrorKind, e: E) -> Self
fn from_external_error(_input: &I, _kind: ErrorKind, e: E) -> Self
Like
ParserError::from_error_kind
but also include an external error.Source§impl<I: Stream, C> ParserError<I> for ContextError<C>
impl<I: Stream, C> ParserError<I> for ContextError<C>
Source§fn from_error_kind(_input: &I, _kind: ErrorKind) -> Self
fn from_error_kind(_input: &I, _kind: ErrorKind) -> Self
Creates an error from the input position and an
ErrorKind
Source§fn append(
self,
_input: &I,
_token_start: &<I as Stream>::Checkpoint,
_kind: ErrorKind,
) -> Self
fn append( self, _input: &I, _token_start: &<I as Stream>::Checkpoint, _kind: ErrorKind, ) -> Self
Like
ParserError::from_error_kind
but merges it with the existing error. Read moreSource§impl<C: PartialEq> PartialEq for ContextError<C>
impl<C: PartialEq> PartialEq for ContextError<C>
Auto Trait Implementations§
impl<C> Freeze for ContextError<C>
impl<C = StrContext> !RefUnwindSafe for ContextError<C>
impl<C> Send for ContextError<C>where
C: Send,
impl<C> Sync for ContextError<C>where
C: Sync,
impl<C> Unpin for ContextError<C>where
C: Unpin,
impl<C = StrContext> !UnwindSafe for ContextError<C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more