pub struct Entry { /* private fields */ }Expand description
A single entry in an error report, pairing an error message with an
optional source-code Location.
Entries are produced by Report::new and accessed via
Report::entries or Report::iter.
§Examples
use errorstack::{ErrorStack, Report};
#[derive(thiserror::Error, ErrorStack, Debug)]
#[error("something broke")]
struct MyError {
#[location]
location: &'static std::panic::Location<'static>,
}
let report = Report::new(&MyError::new());
let messages: Vec<_> = report.iter().map(|e| e.message()).collect();
assert_eq!(messages, ["something broke"]);Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Entry
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnsafeUnpin for Entry
impl UnwindSafe for Entry
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