pub struct StructuredError {
pub context: ErrorContext,
pub message: String,
pub cause: Option<Box<StructuredError>>,
}Expand description
A structured error with location and optional cause chain
Fields§
§context: ErrorContext§message: String§cause: Option<Box<StructuredError>>Implementations§
Source§impl StructuredError
impl StructuredError
pub fn new( name: impl ToString, line: usize, col: usize, len: usize, message: impl ToString, ) -> Self
pub fn with_cause(self, cause: StructuredError) -> Self
Sourcepub fn chain(&self) -> ErrorChainIter<'_> ⓘ
pub fn chain(&self) -> ErrorChainIter<'_> ⓘ
Iterate through the error chain
Trait Implementations§
Source§impl Debug for StructuredError
impl Debug for StructuredError
Auto Trait Implementations§
impl Freeze for StructuredError
impl RefUnwindSafe for StructuredError
impl Send for StructuredError
impl Sync for StructuredError
impl Unpin for StructuredError
impl UnwindSafe for StructuredError
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