pub enum TreeError<I, C = StrContext> {
Base(TreeErrorBase<I>),
Stack {
base: Box<Self>,
stack: Vec<TreeErrorFrame<I, C>>,
},
Alt(Vec<Self>),
}
Expand description
Trace all error paths, particularly for tests
Variants§
Base(TreeErrorBase<I>)
Initial error that kicked things off
Stack
Traces added to the error while walking back up the stack
Fields
§
stack: Vec<TreeErrorFrame<I, C>>
Traces added to the error while walking back up the stack
Alt(Vec<Self>)
All failed branches of an alt
Implementations§
Trait Implementations§
source§impl<I, C> AddContext<I, C> for TreeError<I, C>where
I: Clone,
impl<I, C> AddContext<I, C> for TreeError<I, C>where
I: Clone,
source§fn add_context(self, input: &I, context: C) -> Self
fn add_context(self, input: &I, context: C) -> Self
Append to an existing error custom data Read more
source§impl<I: Clone + Debug + Display + Sync + Send + 'static, C: Display + Debug> Error for TreeError<I, C>
impl<I: Clone + Debug + Display + Sync + Send + 'static, C: Display + Debug> Error for TreeError<I, C>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl<I, C, E: Error + Send + Sync + 'static> FromExternalError<I, E> for TreeError<I, C>where
I: Clone,
impl<I, C, E: Error + Send + Sync + 'static> FromExternalError<I, E> for TreeError<I, C>where
I: Clone,
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, C> ParserError<I> for TreeError<I, C>where
I: Clone,
impl<I, C> ParserError<I> for TreeError<I, C>where
I: Clone,
Auto Trait Implementations§
impl<I, C> Freeze for TreeError<I, C>where
I: Freeze,
impl<I, C = StrContext> !RefUnwindSafe for TreeError<I, C>
impl<I, C> Send for TreeError<I, C>
impl<I, C> Sync for TreeError<I, C>
impl<I, C> Unpin for TreeError<I, C>
impl<I, C = StrContext> !UnwindSafe for TreeError<I, 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