Crate inspect

Source
Expand description

This module implements the inspect framework, which allows an object to expose its state for diagnostics purposes as a hierarchy. All such subtrees are linked together into a single tree for the process, and clients can query information from arbitrary portions of the tree by path.

To participate in the tree, an object implements the Inspect trait and arranges for itself to be inspected, usually automatically via an existing parent-child relationship.

For most cases, users should use the derive version of Inspect as this will automatically update the implementation as new fields are added.

Structs§

Adhoc
Returned by adhoc or adhoc_mut.
AsBinary
Wrapper around T that implements Inspect by writing a value with ValueFlags::binary.
AsBytes
Wrapper around T that implements Inspect by writing a ValueKind::Bytes value.
AsCounter
Wrapper around T that implements Inspect by writing a value with ValueFlags::count.
AsDebug
Wrapper around T that implements Inspect by formatting with the Debug trait.
AsDisplay
Wrapper around T that implements Inspect by calling ToString::to_string().
AsHex
Wrapper around T that implements Inspect by writing a value with ValueFlags::hex.
AtomicMut
Inspect wrapper for an atomic value (e.g., AtomicBool, allowing updates.
Deferred
A deferred inspection, which can provide inspection results asynchronously from a call to inspect.
DeferredUpdate
A deferred inspection, which can provide inspection results asynchronously from a call to inspect.
Entry
A directory entry.
ExternalRequest
Return value from Deferred::external_request, specifying parameters for a remote inspection.
Inspection
An active inspection, returned by inspect() or InspectionBuilder::inspect().
InspectionBuilder
A builder for an inspection request.
Iterated
Implementation of Inspect a type that implements Iterator with an item type (K, V).
Request
An inspection request.
Response
A type used to build an inspection response.
Update
An active update operation, returned by update() or InspectionBuilder::update().
UpdateRequest
An update request, used for updating a value.
Value
A child inspection value. This is not constructed directly but exists to provide From implementations from the allowed value types.
ValueFlags
Flags specifying additional metadata on values.

Enums§

Error
A node resolution error.
ExternalRequestType
The request type associated with ExternalRequest.
Node
A node of an inspect result.
SensitivityLevel
The sensitivity level for an inspection node or request. Requests will only return nodes at or below their sensitivity level. For example, a request set to SensitivityLevel::Safe will not return nodes with SensitivityLevel::Sensitive or SensitivityLevel::Unknown.
ValueKind
The different kinds of values that can be emitted.

Traits§

Inspect
Trait implemented by objects whose state can be inspected but not mutated.
InspectMut
Trait implemented by objects whose state can be inspected and mutated. Most users should not implement this trait directly, but instead derive InspectMut.

Functions§

adhoc
Returns an object that implements Inspect by calling f with the inspection request.
adhoc_mut
Returns an object that implements InspectMut by calling f with the inspection request.
inspect
Inspects obj for state at path.
iter_by_index
Wraps an iterator for inspection, using the index in the enumeration as the field name.
iter_by_key
Wraps an iterator for inspection.
update
Updates a value in obj at path to value value.

Derive Macros§

Inspect
Derives the Inspect trait for a struct or enum.
InspectMut
Derives the InspectMut trait for a struct or enum.