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<T> WriteInspect for InspectList<'_, T>where
T: WriteInspect,
impl<T> WriteInspect for InspectList<'_, 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
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more