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
oradhoc_mut
. - AsBinary
- Wrapper around
T
that implementsInspect
by writing a value withValueFlags::binary
. - AsBytes
- Wrapper around
T
that implementsInspect
by writing aValueKind::Bytes
value. - AsCounter
- Wrapper around
T
that implementsInspect
by writing a value withValueFlags::count
. - AsDebug
- Wrapper around
T
that implementsInspect
by formatting with theDebug
trait. - AsDisplay
- Wrapper around
T
that implementsInspect
by callingToString::to_string()
. - AsHex
- Wrapper around
T
that implementsInspect
by writing a value withValueFlags::hex
. - Atomic
Mut - 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
. - Deferred
Update - A deferred inspection, which can provide inspection results asynchronously
from a call to
inspect
. - Entry
- A directory entry.
- External
Request - Return value from
Deferred::external_request
, specifying parameters for a remote inspection. - Inspection
- An active inspection, returned by
inspect()
orInspectionBuilder::inspect()
. - Inspection
Builder - A builder for an inspection request.
- Iterated
- Implementation of
Inspect
a type that implementsIterator
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()
orInspectionBuilder::update()
. - Update
Request - 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. - Value
Flags - Flags specifying additional metadata on values.
Enums§
- Error
- A node resolution error.
- External
Request Type - The request type associated with
ExternalRequest
. - Node
- A node of an inspect result.
- Sensitivity
Level - 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 withSensitivityLevel::Sensitive
orSensitivityLevel::Unknown
. - Value
Kind - The different kinds of values that can be emitted.
Traits§
- Inspect
- Trait implemented by objects whose state can be inspected but not mutated.
- Inspect
Mut - 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 callingf
with the inspection request. - adhoc_
mut - Returns an object that implements
InspectMut
by callingf
with the inspection request. - inspect
- Inspects
obj
for state atpath
. - 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
atpath
to valuevalue
.
Derive Macros§
- Inspect
- Derives the
Inspect
trait for a struct or enum. - Inspect
Mut - Derives the
InspectMut
trait for a struct or enum.