Struct ErrorRef
pub struct ErrorRef<'a, E>(pub &'a E)
where
E: Error + ?Sized;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 ETrait 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> UnsafeUnpin 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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more