class BoundedListNode
Defined at line 45 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/bounded_list_node.h
`BoundedListNode` is a list of Inspect nodes with a maximum capacity.
Nodes are rolled out in FIFO order as new nodes beyond `capacity()` are created.
Nodes are named by insertion order: "0", "1", "2", ...
For example,
```
auto list = BoundedListNode(inspector.GetRoot().CreateChild("list"), 3);
list.CreateEntry([](Node
&
n) { n.RecordInt("first", 1); });
list.CreateEntry([](Node
&
n) { n.RecordInt("second", 2); });
list.CreateEntry([](Node
&
n) { n.RecordInt("third", 3); });
```
Would create the hierarchy:
{
root: {
list: {
"0": { "first": 1 },
"1": { "second": 2 },
"2": { "third": 3 },
},
},
}
On a subsequent call to `list.CreateEntry(...)`, the node `"0"` would get pushed out,
and node `"3"` would be inserted, representing that most recent call.
`BoundedListNode` is thread-safe.
Public Methods
uint64_t capacity ()
Check the max capacity of `this`.
Defined at line 8 of file ../../zircon/system/ulib/inspect/bounded_list_node.cc
void CreateEntry (std::function<void (inspect::Node &)> cb)
Create a new entry at the end of `this`, popping from the front if necessary.
Safety: the reference passed to the provided callback will be valid so long as
the referent is present in `this`.
Defined at line 10 of file ../../zircon/system/ulib/inspect/bounded_list_node.cc
void BoundedListNode (inspect::Node && n, uint64_t max_capacity)
Construct a `BoundedListNode` with a fixed max capacity.
Defined at line 48 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/bounded_list_node.h
BoundedListNode & operator= (BoundedListNode && other)
Defined at line 51 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/bounded_list_node.h
void BoundedListNode (BoundedListNode && n)
Defined at line 52 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/bounded_list_node.h
void BoundedListNode (const BoundedListNode & )
Copying inspect::Node is not allowed
Defined at line 55 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/bounded_list_node.h
void BoundedListNode ()
Defined at line 56 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/bounded_list_node.h
void ~BoundedListNode ()
Defined at line 57 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/bounded_list_node.h