pub struct ValueEncoder<'a> { /* private fields */ }Expand description
Encoder for writing field values into the log buffer.
This type is passed to Encode::encode_log_value_into implementations
and provides methods for encoding values using different strategies.
Implementations§
Source§impl<'a> ValueEncoder<'a>
impl<'a> ValueEncoder<'a>
Sourcepub fn value_via_debug<T: Debug>(self, value: &T)
pub fn value_via_debug<T: Debug>(self, value: &T)
Encodes a value using its Debug implementation.
The value is formatted directly into the log buffer without intermediate allocation.
Sourcepub fn value_via_display<T: Display>(self, value: &T)
pub fn value_via_display<T: Display>(self, value: &T)
Encodes a value using its std::fmt::Display implementation.
The value is formatted directly into the log buffer without intermediate allocation.
Auto Trait Implementations§
impl<'a> !UnwindSafe for ValueEncoder<'a>
impl<'a> Freeze for ValueEncoder<'a>
impl<'a> RefUnwindSafe for ValueEncoder<'a>
impl<'a> Send for ValueEncoder<'a>
impl<'a> Sync for ValueEncoder<'a>
impl<'a> Unpin for ValueEncoder<'a>
impl<'a> UnsafeUnpin for ValueEncoder<'a>
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