pub struct Display<V: ?Sized>(/* private fields */);
Expand description
Adapt a fmt::Display
into an [sval::Value
].
Implementations§
source§impl<V: Display> Display<V>
impl<V: Display> Display<V>
sourcepub fn new(value: V) -> Display<V>
pub fn new(value: V) -> Display<V>
Adapt a fmt::Display
into an [sval::Value
].
sourcepub fn into_inner(self) -> V
pub fn into_inner(self) -> V
Convert into the inner value.
source§impl<V: Display + ?Sized> Display<V>
impl<V: Display + ?Sized> Display<V>
sourcepub fn new_borrowed<'a>(value: &'a V) -> &'a Display<V>
pub fn new_borrowed<'a>(value: &'a V) -> &'a Display<V>
Adapt a reference to a fmt::Display
into an [sval::Value
].
Trait Implementations§
source§impl<V: Display> Value for Display<V>
impl<V: Display> Value for Display<V>
source§fn stream<'sval, S: Stream<'sval> + ?Sized>(
&'sval self,
stream: &mut S
) -> Result
fn stream<'sval, S: Stream<'sval> + ?Sized>( &'sval self, stream: &mut S ) -> Result
Stream this value through a
Stream
.source§fn to_f32(&self) -> Option<f32>
fn to_f32(&self) -> Option<f32>
Try convert this value into a 32bit binary floating point number.
Auto Trait Implementations§
impl<V: ?Sized> Freeze for Display<V>where
V: Freeze,
impl<V: ?Sized> RefUnwindSafe for Display<V>where
V: RefUnwindSafe,
impl<V: ?Sized> Send for Display<V>where
V: Send,
impl<V: ?Sized> Sync for Display<V>where
V: Sync,
impl<V: ?Sized> Unpin for Display<V>where
V: Unpin,
impl<V: ?Sized> UnwindSafe for Display<V>where
V: UnwindSafe,
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