Defined at line 526 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/types.h
~Node
public void ~Node()
Defined at line 336 of file ../../zircon/system/ulib/inspect/vmo/types.cc
operator=
public Node & operator=(Node && other)
Defined at line 342 of file ../../zircon/system/ulib/inspect/vmo/types.cc
CreateChild
public
Node
CreateChild(
basic_string_view
name)
Defined at line 353 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |Node| with the given name that is a child of this node. If this node is not stored in a buffer, the created node will also not be stored in a buffer.
RecordChild
public void RecordChild(
basic_string_view
name, RecordChildCallbackFn callback)
Defined at line 360 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |Node| with the given name that is a child of this node. The new child lifetime will be the same as the parent node.
CreateInt
public
NumericProperty
CreateInt(
basic_string_view
name, int64_t value)
Defined at line 366 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |IntProperty| with the given name that is a child of this node. If this node is not stored in a buffer, the created metric will also not be stored in a buffer.
RecordInt
public void RecordInt(
basic_string_view
name, int64_t value)
Defined at line 373 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |IntProperty| with the given name that is a child of this node. The new property lifetime will be the same as the parent node.
CreateUint
public
NumericProperty
CreateUint(
basic_string_view
name, uint64_t value)
Defined at line 377 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |UintProperty| with the given name that is a child of this node. If this node is not stored in a buffer, the created metric will also not be stored in a buffer.
RecordUint
public void RecordUint(
basic_string_view
name, uint64_t value)
Defined at line 384 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |UintProperty| with the given name that is a child of this node. The new property lifetime will be the same as the parent node.
CreateDouble
public
NumericProperty
CreateDouble(
basic_string_view
name, double value)
Defined at line 388 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |DoubleProperty| with the given name that is a child of this node. If this node is not stored in a buffer, the created metric will also not be stored in a buffer.
RecordDouble
public void RecordDouble(
basic_string_view
name, double value)
Defined at line 395 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |DoubleProperty| with the given name that is a child of this node. The new property lifetime will be the same as the parent node.
CreateBool
public
Property
CreateBool(
basic_string_view
name, bool value)
Defined at line 399 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |BoolProperty| with the given name that is a child of this node. If this node is not stored in a buffer, the created metric will also not be stored in a buffer.
RecordBool
public void RecordBool(
basic_string_view
name, bool value)
Defined at line 406 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |BoolProperty| with the given name that is a child of this node. The new property lifetime will be the same as the parent node.
CreateString
public
Property
CreateString(
basic_string_view
name, const std::string & value)
Defined at line 410 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |StringProperty| with the given name and value that is a child of this node. If this node is not stored in a buffer, the created property will also not be stored in a buffer.
RecordString
public void RecordString(
basic_string_view
name, const std::string & value)
Defined at line 417 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |StringProperty| with the given name that is a child of this node. The new property lifetime will be the same as the parent node.
CreateByteVector
public
Property
CreateByteVector(
basic_string_view
name,
span
value)
Defined at line 421 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |ByteVectorProperty| with the given name and value that is a child of this node. If this node is not stored in a buffer, the created property will also not be stored in a buffer.
RecordByteVector
public void RecordByteVector(
basic_string_view
name,
span
value)
Defined at line 428 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |ByteVectorProperty| with the given name that is a child of this node. The new property lifetime will be the same as the parent node.
CreateIntArray
public IntArray CreateIntArray(
basic_string_view
name, size_t slots)
Defined at line 432 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |IntArray| with the given name and slots that is a child of this node. If this node is not stored in a buffer, the created value will also not be stored in a buffer.
CreateUintArray
public UintArray CreateUintArray(
basic_string_view
name, size_t slots)
Defined at line 439 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |UintArray| with the given name and slots that is a child of this node. If this node is not stored in a buffer, the created value will also not be stored in a buffer.
CreateDoubleArray
public DoubleArray CreateDoubleArray(
basic_string_view
name, size_t slots)
Defined at line 446 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |DoubleArray| with the given name and slots that is a child of this node. If this node is not stored in a buffer, the created value will also not be stored in a buffer.
CreateStringArray
public StringArray CreateStringArray(
basic_string_view
name, size_t slots)
Defined at line 453 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |StringArray| with the given name and slots that is a child of this node. If this node is not stored in a buffer, the created value will also not be stored in a buffer.
CreateLinearIntHistogram
public LinearIntHistogram CreateLinearIntHistogram(
basic_string_view
name, int64_t floor, int64_t step_size, size_t buckets)
Defined at line 466 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |LinearIntHistogram| with the given name and format that is a child of this node. If this node is not stored in a buffer, the created value will also not be stored in a buffer.
CreateLinearUintHistogram
public LinearUintHistogram CreateLinearUintHistogram(
basic_string_view
name, uint64_t floor, uint64_t step_size, size_t buckets)
Defined at line 477 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |LinearUintHistogram| with the given name and format that is a child of this node. If this node is not stored in a buffer, the created value will also not be stored in a buffer.
CreateLinearDoubleHistogram
public LinearDoubleHistogram CreateLinearDoubleHistogram(
basic_string_view
name, double floor, double step_size, size_t buckets)
Defined at line 488 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |LinearDoubleHistogram| with the given name and format that is a child of this node. If this node is not stored in a buffer, the created value will also not be stored in a buffer.
CreateExponentialIntHistogram
public ExponentialIntHistogram CreateExponentialIntHistogram(
basic_string_view
name, int64_t floor, int64_t initial_step, int64_t step_multiplier, size_t buckets)
Defined at line 499 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |ExponentialIntHistogram| with the given name and format that is a child of this node. If this node is not stored in a buffer, the created value will also not be stored in a buffer.
CreateExponentialUintHistogram
public ExponentialUintHistogram CreateExponentialUintHistogram(
basic_string_view
name, uint64_t floor, uint64_t initial_step, uint64_t step_multiplier, size_t buckets)
Defined at line 512 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |ExponentialUintHistogram| with the given name and format that is a child of this node. If this node is not stored in a buffer, the created value will also not be stored in a buffer.
CreateExponentialDoubleHistogram
public ExponentialDoubleHistogram CreateExponentialDoubleHistogram(
basic_string_view
name, double floor, double initial_step, double step_multiplier, size_t buckets)
Defined at line 525 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |ExponentialDoubleHistogram| with the given name and format that is a child of this node. If this node is not stored in a buffer, the created value will also not be stored in a buffer.
Node
public void Node()
Defined at line 530 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/types.h
Construct a default node. Operations on this node are no-ops.
Node
public void Node(const Node & other)
Defined at line 534 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/types.h
Allow moving, disallow copying.
Node
public void Node(Node && other)
Defined at line 535 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/types.h
operator=
public Node & operator=(const Node & other)
Defined at line 536 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/types.h
CreateLazyNode
public
LazyNode
CreateLazyNode(
basic_string_view
name, LazyNodeCallbackFn callback)
Defined at line 546 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |LazyNode| with the given name that is populated by the given callback on demand.
The passed |callback| will live as long as the returned LazyNode, and will not be called concurrently by multiple threads.
For example: auto a = root.CreateChild("a"); a.CreateLazyNode("b", [] { Inspector insp; ValueList values; insp.GetRoot().CreateInt("val", 2, &values); return fpromise::make_ok_result(insp); });
Output: root: a: b: val = 2
CreateChild
public void CreateChild(
basic_string_view
name, T * list)
Defined at line 549 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/types.h
Same as CreateChild, but emplaces the value in the given container.
The type of |list| must have method emplace(Node). inspect::ValueList is recommended for most use cases.
RecordLazyNode
public void RecordLazyNode(
basic_string_view
name, LazyNodeCallbackFn callback)
Defined at line 553 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |LazyNode| with the given name that is a child of this node. The new child lifetime will be the same as the parent node.
Record
public void Record(T value)
Defined at line 555 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/types.h
Associates the lifetime of the given value with the node lifetime.
RecordLazyValues
public void RecordLazyValues(
basic_string_view
name, LazyNodeCallbackFn callback)
Defined at line 565 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |LazyNode| with the given name that is a child of this node. The new child lifetime will be the same as the parent node.
CreateLazyValues
public
LazyNode
CreateLazyValues(
basic_string_view
name, LazyNodeCallbackFn callback)
Defined at line 558 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a new |LazyNode| whose children and properties are added to this node on demand.
The passed |callback| will live as long as the returned LazyNode, and will not be called concurrently by multiple threads.
The name is only used if inflating the tree callback fails.
WARNING: It is the caller's responsibility to avoid name collisions with other properties on this node.
For example: auto a = root.CreateChild("a"); a.CreateLazy("b", [] { Inspector insp; ValueList values; insp.GetRoot().CreateInt("val", 2).enlist(&values); return fpromise::make_ok_promise(insp); });
Output: root: a: val = 2
Alternatively:
a.CreateLazyNode("b", [] { return fpromise::make_error_promise(); });
Possible output: root: a: b [Failed to open link]
AtomicUpdate
public void AtomicUpdate(AtomicUpdateCallbackFn callback)
Defined at line 570 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Runs |callback| on this node.
All operations performed by |callback| are guaranteed to appear in the same generation when reading Inspect data.
UniqueName
public
basic_string
UniqueName(const std::string & prefix)
Defined at line 539 of file ../../zircon/system/ulib/inspect/vmo/types.cc
Create a unique name for children of this node.
The returned strings are guaranteed to be at least unique within the context of this Node, except in the case that this is a default no-op node, in which case this always returns the empty string.
CreateInt
public void CreateInt(
basic_string_view
name, int64_t value, T * list)
Defined at line 577 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/types.h
Same as CreateInt, but emplaces the value in the given container.
The type of |list| must have method emplace(IntProperty). inspect::ValueList is recommended for most use cases.
CreateUint
public void CreateUint(
basic_string_view
name, uint64_t value, T * list)
Defined at line 595 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/types.h
Same as CreateUint, but emplaces the value in the given container.
The type of |list| must have method emplace(UintProperty). inspect::ValueList is recommended for most use cases.
CreateDouble
public void CreateDouble(
basic_string_view
name, double value, T * list)
Defined at line 613 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/types.h
Same as CreateDouble, but emplaces the value in the given container.
The type of |list| must have method emplace(DoubleProperty). inspect::ValueList is recommended for most use cases.
CreateBool
public void CreateBool(
basic_string_view
name, bool value, T * list)
Defined at line 631 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/types.h
Same as CreateBool, but emplaces the value in the given container.
The type of |list| must have method emplace(BoolProperty). inspect::ValueList is recommended for most use cases.
CreateString
public void CreateString(
basic_string_view
name, const std::string & value, T * list)
Defined at line 649 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/types.h
Same as CreateString, but emplaces the value in the given container.
The type of |list| must have method emplace(StringProperty). inspect::ValueList is recommended for most use cases.
CreateByteVector
public void CreateByteVector(
basic_string_view
name,
span
value, T * list)
Defined at line 668 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/types.h
Same as CreateByteVector, but emplaces the value in the given container.
The type of |list| must have method emplace(ByteVectorProperty). inspect::ValueList is recommended for most use cases.
CreateLazyNode
public void CreateLazyNode(
basic_string_view
name, F callback, T * list)
Defined at line 767 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/types.h
Same as CreateLazyNode, but emplaces the value in the given container.
The type of |list| must have method emplace(LazyNode). inspect::ValueList is recommended for most use cases.
CreateLazyValues
public void CreateLazyValues(
basic_string_view
name, F callback, T * list)
Defined at line 817 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/types.h
Same as CreateLazyValues, but emplaces the value in the given container.
The type of |list| must have method emplace(LazyNode). inspect::ValueList is recommended for most use cases.
operator bool
public bool operator bool()
Defined at line 828 of file ../../zircon/system/ulib/inspect/include/lib/inspect/cpp/vmo/types.h
Return true if this node is stored in a buffer. False otherwise.