pub struct ErrorRef<'a, E: ?Sized + StdError>(pub &'a E);
Expand description
A wrapper struct for serializing errors references.
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 available if either std
or core::error::Error
is.
Use ErrorValue
if you want to move ownership of the error value.
Tuple Fields§
§0: &'a E
Trait Implementations§
Auto Trait Implementations§
impl<'a, E> Freeze for ErrorRef<'a, E>where
E: ?Sized,
impl<'a, E> RefUnwindSafe for ErrorRef<'a, E>where
E: RefUnwindSafe + ?Sized,
impl<'a, E> Send for ErrorRef<'a, E>
impl<'a, E> Sync for ErrorRef<'a, E>
impl<'a, E> Unpin for ErrorRef<'a, E>where
E: ?Sized,
impl<'a, E> UnwindSafe for ErrorRef<'a, E>where
E: RefUnwindSafe + ?Sized,
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