pub struct ErrorValue<E>(pub E)
where
    E: Error
;
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.

Tuple Fields

0: E

Trait Implementations

Serialize self into Serializer Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.