pub struct AnyErr<E: StdError + Send + Sync + 'static>(pub E);Expand description
Wrapper that implements RawStdError for any StdError.
This is the bridge for third-party error types that don’t have a
dedicated UnstructuredSource impl. Downstream code rarely needs to
name this type directly; use any_err instead.
Tuple Fields§
§0: ETrait Implementations§
Source§impl<E: StdError + Send + Sync + 'static> Error for AnyErr<E>
impl<E: StdError + Send + Sync + 'static> Error for AnyErr<E>
Source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl<E: StdError + Send + Sync + 'static> RawStdError for AnyErr<E>
Auto Trait Implementations§
impl<E> Freeze for AnyErr<E>where
E: Freeze,
impl<E> RefUnwindSafe for AnyErr<E>where
E: RefUnwindSafe,
impl<E> Send for AnyErr<E>
impl<E> Sync for AnyErr<E>
impl<E> Unpin for AnyErr<E>where
E: Unpin,
impl<E> UnsafeUnpin for AnyErr<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for AnyErr<E>where
E: UnwindSafe,
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