Struct winnow::error::ContextError
source · 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 moreAuto Trait Implementations§
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