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.