pub struct InspectBytes<T: AsRef<[u8]>>(pub T);
Expand description
Wrapper to log bytes in an inspect_log!
or inspect_insert!
macro.
This wrapper is defined because a default WriteInspect
implementation isn’t provided for
an array or slice of bytes. Such default implementation was left out so that the user has
to explicitly choose whether to log bytes slice as a string or a byte vector in Inspect.
Tuple Fields§
§0: T
Trait Implementations§
Source§impl<T: AsRef<[u8]>> WriteInspect for InspectBytes<T>
impl<T: AsRef<[u8]>> WriteInspect for InspectBytes<T>
Source§fn write_inspect(&self, writer: &Node, key: impl Into<StringReference>)
fn write_inspect(&self, writer: &Node, key: impl Into<StringReference>)
Write a single value (property or child node) to |node| with the specified |key|.
If multiple properties need to be written, consider creating a single child
node with those properties.
Auto Trait Implementations§
impl<T> Freeze for InspectBytes<T>where
T: Freeze,
impl<T> RefUnwindSafe for InspectBytes<T>where
T: RefUnwindSafe,
impl<T> Send for InspectBytes<T>where
T: Send,
impl<T> Sync for InspectBytes<T>where
T: Sync,
impl<T> Unpin for InspectBytes<T>where
T: Unpin,
impl<T> UnwindSafe for InspectBytes<T>where
T: 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