Crate diagnostics_reader
source ·Macros
Macro to simplify tree matching in tests. The first argument is the actual tree passed as a
DiagnosticsHierarchyGetter
(e.g. a DiagnosticsHierarchy
or an Inspector
). The second argument is given
to tree_assertion!
which creates a TreeAssertion
to validate the tree.Macro to check a hierarchy with a nice JSON diff.
The syntax of the
expected
value is the same as that of hierarchy!
, and
essentially the same as assert_data_tree!
, except that partial tree matching
is not supported (i.e. the keyword contains
).This macro simplifies creating diagnostics hierarchies, to remove the need of writing multiple
nested hierarchies and manually writing all properties.
Macro to simplify creating
TreeAssertion
s. Commonly used indirectly through the second
parameter of assert_data_tree!
. See assert_data_tree!
for more usage examples.Structs
A PropertyAssertion that always passes
Utility for reading inspect data of a running component using the injected Archive
Reader service.
An inspect tree selector for a component.
An instance of diagnostics data with typed metadata and an optional nested payload.
A hierarchy of nodes representing structured data, such as Inspect or
structured log data.
An assertion for a histogram property.
Inspect carries snapshots of data trees hosted by components.
Logs carry streams of structured events from components.
A PropertyAssertion that passes for non-zero, unsigned integers.
Struct for matching against a Data tree (DiagnosticsHierarchy).
Enums
Errors that this library can return
A named property. Each of the fields consists of (name, value).
Severities a log message can have, often called the log’s “level”.
Traits
A type which can function as a “view” into a diagnostics hierarchy, optionally allocating a new
instance to service a request.
Trait implemented by types that can act as properies for assertion.