pub struct ErrorContext<'a> { /* private fields */ }Expand description
Collect context for creating an error
Implementations§
Source§impl<'a> ErrorContext<'a>
impl<'a> ErrorContext<'a>
Sourcepub fn msg<M>(message: M) -> ErrorContext<'a>where
M: Display,
pub fn msg<M>(message: M) -> ErrorContext<'a>where
M: Display,
Create a new error object from a printable error message.
Sourcepub fn within(self, within: Arg<'a>) -> ErrorContext<'a>
pub fn within(self, within: Arg<'a>) -> ErrorContext<'a>
Arg the error occurred within
Sourcepub fn unexpected(self, unexpected: Arg<'a>) -> ErrorContext<'a>
pub fn unexpected(self, unexpected: Arg<'a>) -> ErrorContext<'a>
The failing Arg
Trait Implementations§
Source§impl<'a> Debug for ErrorContext<'a>
impl<'a> Debug for ErrorContext<'a>
Source§impl Display for ErrorContext<'_>
impl Display for ErrorContext<'_>
Auto Trait Implementations§
impl<'a> Freeze for ErrorContext<'a>
impl<'a> RefUnwindSafe for ErrorContext<'a>
impl<'a> Send for ErrorContext<'a>
impl<'a> Sync for ErrorContext<'a>
impl<'a> Unpin for ErrorContext<'a>
impl<'a> UnwindSafe for ErrorContext<'a>
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