pub struct Error(_);
Expand description
The top-level error type used by this crate. This is just a newtype wrapper around
anyhow::Error. A newtype is used so that additional traits can be defined
(most importantly From<Error> for std::io::Error
).
Implementations§
source§impl Error
impl Error
pub fn new(err: Error) -> Self
pub fn map<T>(result: Result<T>) -> Result<T>
pub fn downcast<E: Error + Send + Sync + 'static>(self) -> Result<E, Self>
pub fn context<C: Display + Send + Sync + 'static>(self, context: C) -> Self
pub fn downcast_ref<E: Display + Debug + Send + Sync + 'static>( &self ) -> Option<&E>
pub fn downcast_mut<E: Display + Debug + Send + Sync + 'static>( &mut self ) -> Option<&mut E>
Trait Implementations§
Auto Trait Implementations§
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