pub struct NexError { /* private fields */ }Expand description
A type-erased error that can hold any error type.
Equivalent to anyhow::Error.
Implementations§
Source§impl NexError
impl NexError
Sourcepub fn msg<M: Display + Send + Sync + 'static>(message: M) -> Self
pub fn msg<M: Display + Send + Sync + 'static>(message: M) -> Self
Creates a new error from a displayable message.
Sourcepub fn context<C: Display + Send + Sync + 'static>(self, ctx: C) -> Self
pub fn context<C: Display + Send + Sync + 'static>(self, ctx: C) -> Self
Wraps an existing error with additional context.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NexError
impl !RefUnwindSafe for NexError
impl Send for NexError
impl Sync for NexError
impl Unpin for NexError
impl UnsafeUnpin for NexError
impl !UnwindSafe for NexError
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