pub struct ErrorContext<T> { /* private fields */ }Expand description
Error context builder for adding context to errors
Implementations§
Source§impl<T> ErrorContext<T>
impl<T> ErrorContext<T>
pub fn new(result: Result<T, ShapeError>) -> Self
Sourcepub fn with_location(self, location: SourceLocation) -> Result<T, ShapeError>
pub fn with_location(self, location: SourceLocation) -> Result<T, ShapeError>
Add location information to the error
Auto Trait Implementations§
impl<T> Freeze for ErrorContext<T>where
T: Freeze,
impl<T> !RefUnwindSafe for ErrorContext<T>
impl<T> Send for ErrorContext<T>where
T: Send,
impl<T> Sync for ErrorContext<T>where
T: Sync,
impl<T> Unpin for ErrorContext<T>where
T: Unpin,
impl<T> UnsafeUnpin for ErrorContext<T>where
T: UnsafeUnpin,
impl<T> !UnwindSafe for ErrorContext<T>
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