pub struct ErrorValue<E: StdError>(pub E);Expand description
A wrapper struct for serializing errors
This struct can be used to wrap types that don’t implement slog::Value but
do implement std::error::Error so that they can be logged.
This is usually not used directly but using #error in the macros.
This struct is only available in std because the Error trait is not available
without std.
Use ErrorRef if you have an error reference.
Tuple Fields§
§0: ETrait Implementations§
Auto Trait Implementations§
impl<E> Freeze for ErrorValue<E>where
E: Freeze,
impl<E> RefUnwindSafe for ErrorValue<E>where
E: RefUnwindSafe,
impl<E> Send for ErrorValue<E>where
E: Send,
impl<E> Sync for ErrorValue<E>where
E: Sync,
impl<E> Unpin for ErrorValue<E>where
E: Unpin,
impl<E> UnwindSafe for ErrorValue<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