Enum diem_logger::Value
source · pub enum Value<'v> {
Debug(&'v dyn Debug),
Display(&'v dyn Display),
Serde(&'v dyn Serialize),
}
Expand description
The value part of a logging key value pair e.g. info!(key = value)
Variants§
Implementations§
source§impl<'v> Value<'v>
impl<'v> Value<'v>
sourcepub fn from_serde<T: Serialize>(value: &'v T) -> Self
pub fn from_serde<T: Serialize>(value: &'v T) -> Self
Get a value from a debuggable type.
sourcepub fn from_debug<T: Debug>(value: &'v T) -> Self
pub fn from_debug<T: Debug>(value: &'v T) -> Self
Get a value from a debuggable type.
sourcepub fn from_display<T: Display>(value: &'v T) -> Self
pub fn from_display<T: Display>(value: &'v T) -> Self
Get a value from a displayable type.
Trait Implementations§
impl<'v> Copy for Value<'v>
Auto Trait Implementations§
impl<'v> !RefUnwindSafe for Value<'v>
impl<'v> !Send for Value<'v>
impl<'v> !Sync for Value<'v>
impl<'v> Unpin for Value<'v>
impl<'v> !UnwindSafe for Value<'v>
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