pub struct InspectList<'a, T>(pub &'a [T]);
Expand description
Wrapper to log a list of items in inspect_log!
or inspect_insert!
macro. Each item
in the list must be a type that implements WriteInspect
Example:
let list = ["foo", "bar", "baz"];
inspect_insert!(node_writer, some_list: InspectList(&list));
The above code snippet would create the following child under node_writer:
some_list:
0: "foo"
1: "bar"
2: "baz"
Tuple Fields§
§0: &'a [T]
Trait Implementations§
Source§impl<'a, T> WriteInspect for InspectList<'a, T>where
T: WriteInspect,
impl<'a, T> WriteInspect for InspectList<'a, T>where
T: WriteInspect,
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<'a, T> Freeze for InspectList<'a, T>
impl<'a, T> RefUnwindSafe for InspectList<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for InspectList<'a, T>where
T: Sync,
impl<'a, T> Sync for InspectList<'a, T>where
T: Sync,
impl<'a, T> Unpin for InspectList<'a, T>
impl<'a, T> UnwindSafe for InspectList<'a, T>where
T: RefUnwindSafe,
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