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
adhocoradhoc_mut. - AsBinary
- Wrapper around
Tthat implementsInspectby writing a value withValueFlags::binary. - AsBytes
- Wrapper around
Tthat implementsInspectby writing aValueKind::Bytesvalue. - AsCounter
- Wrapper around
Tthat implementsInspectby writing a value withValueFlags::count. - AsDebug
- Wrapper around
Tthat implementsInspectby formatting with theDebugtrait. - AsDeferred
- The return type of
send. - AsDisplay
- Wrapper around
Tthat implementsInspectby callingToString::to_string(). - AsHex
- Wrapper around
Tthat implementsInspectby 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
Inspecta type that implementsIteratorwith 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
Fromimplementations 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::Safewill not return nodes withSensitivityLevel::SensitiveorSensitivityLevel::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
Inspectby callingfwith the inspection request. - adhoc_
mut - Returns an object that implements
InspectMutby callingfwith the inspection request. - inspect
- Inspects
objfor 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.
- send
- An
Inspectimplementation that defers the inspection to another thread or context by sending the request on a [mesh] channel. - update
- Updates a value in
objatpathto valuevalue.
Derive Macros§
- Inspect
- Derives the
Inspecttrait for a struct or enum. - Inspect
Mut - Derives the
InspectMuttrait for a struct or enum.