pub struct DiagnosticsHierarchy<Key = String> {
    pub name: String,
    pub properties: Vec<Property<Key>, Global>,
    pub children: Vec<DiagnosticsHierarchy<Key>, Global>,
    pub missing: Vec<MissingValue, Global>,
}
Expand description

A hierarchy of nodes representing structured data, such as Inspect or structured log data.

Each hierarchy consists of properties, and a map of named child hierarchies.

Fields

name: String

The name of this node.

properties: Vec<Property<Key>, Global>

The properties for the node.

children: Vec<DiagnosticsHierarchy<Key>, Global>

The children of this node.

missing: Vec<MissingValue, Global>

Values that were impossible to load.

Implementations

Sorts the properties and children of the diagnostics hierarchy by name.

Creates a new empty diagnostics hierarchy with the root node named “root”.

Creates a new diagnostics hierarchy with the given name for the root and the given properties and children under that root.

Either returns an existing child of self with name name or creates a new child with name name.

Add a child to this DiagnosticsHierarchy.

Note: It is possible to create multiple children with the same name using this method, but readers may not support such a case.

Creates and returns a new Node whose location in a hierarchy rooted at self is defined by node_path.

Requires: that node_path is not empty. Requires: that node_path begin with the key fragment equal to the name of the node that add is being called on.

NOTE: Inspect VMOs may allow multiple nodes of the same name. In this case, the first node found is returned.

Inserts a new Property into this hierarchy.

Inserts a new Property into a Node whose location in a hierarchy rooted at self is defined by node_path.

Requires: that node_path is not empty. Requires: that node_path begin with the key fragment equal to the name of the node that add is being called on.

NOTE: Inspect VMOs may allow multiple nodes of the same name. In this case, the property is added to the first node found.

Provides an iterator over the diagnostics hierarchy returning properties in pre-order.

Adds a value that couldn’t be read. This can happen when loading a lazy child.

Returns the property of the given |name| if one exists.

Returns the child of the given |name| if one exists.

Returns the child of the given |path| if one exists.

Returns the property of the given |name| if one exists.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more

Transforms the partial hierarchy into a DiagnosticsHierarchy. If the node hierarchy had unexpanded links, those will appear as missing values.

Converts this type into the (usually inferred) input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more
Returns a map from a graph’s node to the children of that node, indexed by their Trie-equivalent prefix. Read more
Returns the vector of values that a graph’s node is storing. Read more
The type returned in the event of a conversion error.
Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more