pub struct Error { /* private fields */ }Expand description
Any error. Like anyhow::Error it is not itself a std::error::Error,
so every error type converts into it with ?.
Implementations§
Source§impl Error
impl Error
pub fn new(error: impl Error + Send + Sync + 'static) -> Self
Sourcepub fn internal(message: impl Into<String>) -> Self
pub fn internal(message: impl Into<String>) -> Self
An internal failure with a message for the logs. Callers never see it.
pub fn get_ref(&self) -> &(dyn Error + Send + Sync + 'static)
pub fn downcast_ref<E: Error + 'static>(&self) -> Option<&E>
Sourcepub fn chain(&self) -> String
pub fn chain(&self) -> String
This error and its sources, for a log line. Traversal depth is bounded
by MAX_SOURCE_DEPTH to protect against cycles in source chains.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Forget for Error
impl Freeze for Error
impl Move for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Errorwhere
*const dyn Error + Sync + Send is !null: UnsafeUnpin,
PhantomData<dyn Error + Sync + Send>: UnsafeUnpin,
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