pub struct Error { /* private fields */ }
Implementations§
Source§impl Error
impl Error
pub fn new<E, C>(kind: E, context: C) -> Self
Sourcepub fn with_context<C, K>(context: C) -> impl FnOnce(K) -> Self
pub fn with_context<C, K>(context: C) -> impl FnOnce(K) -> Self
Create a new error with a context.
Sourcepub fn custom_with_context<C, E>(context: C) -> impl FnOnce(E) -> Self
pub fn custom_with_context<C, E>(context: C) -> impl FnOnce(E) -> Self
Create a new custom error with a context.
pub fn kind(&self) -> &ErrorKind
pub fn context(&self) -> &str
pub fn into_inner(self) -> ErrorKind
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl !Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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