pub struct StringTracer(pub String);
Expand description
A naive string tracer serializes error messages into
string and simply concatenate them together.
This can be used for example in no_std
environment,
which may not support more complex error tracers.
Tuple Fields§
§0: String
Trait Implementations§
Source§impl Debug for StringTracer
impl Debug for StringTracer
Source§impl Display for StringTracer
impl Display for StringTracer
Source§impl ErrorMessageTracer for StringTracer
impl ErrorMessageTracer for StringTracer
Source§impl<E: Display> ErrorTracer<E> for StringTracer
impl<E: Display> ErrorTracer<E> for StringTracer
Source§fn new_trace(err: E) -> Self
fn new_trace(err: E) -> Self
Create a new error trace from
E
, also taking ownership of it. Read moreSource§fn add_trace(self, err: E) -> Self
fn add_trace(self, err: E) -> Self
Add a new error trace from
E
. In the current underlying implementation,
this is effectively still has the same behavior as
ErrorMessageTracer::add_message
. This is because eyre
and
anyhow
do not support adding new set of backtraces to an existing
trace. So effectively, currently the error tracers can track at most
one backtrace coming from the original error source.Auto Trait Implementations§
impl Freeze for StringTracer
impl RefUnwindSafe for StringTracer
impl Send for StringTracer
impl Sync for StringTracer
impl Unpin for StringTracer
impl UnwindSafe for StringTracer
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