> This page is for NeMo Relay, version dev.
> For other versions, use one of these documentation indexes:
> - Latest (v0.10.4) (default): https://docs.nvidia.com/nemo/relay/latest/llms.txt
> - dev: https://docs.nvidia.com/nemo/relay/dev/llms.txt
> - v0.10.4: https://docs.nvidia.com/nemo/relay/v0.10.4/llms.txt
> - v0.9.4: https://docs.nvidia.com/nemo/relay/v0.9.4/llms.txt
> - v0.8.4: https://docs.nvidia.com/nemo/relay/v0.8.4/llms.txt
> - v0.7.3: https://docs.nvidia.com/nemo/relay/v0.7.3/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/relay/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/relay/_mcp/server.

# Struct Diagnostics

> Independent diagnostics context with immutable startup enablement.

Generated from `cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker`.

```rust
pub struct Diagnostics { /* private fields */ }
```

Independent diagnostics context with immutable startup enablement.

Clones share this context only. State and budgets are independent of logger lifetime and of any other explicitly isolated embedded contexts.

## Implementations

### `impl Diagnostics`

<pre />

#### `from_settings`

<pre />

Construct a context using the startup owner's selected mode and capacities.

Enabled mode validates arithmetic and admits backend storage before use. The circular-history allocation uses the global allocation-error handler on allocation failure; fallible pool reservations return an error. Disabled mode retains lightweight source/settings state without registry, history, detail, query, or projection pools. Source role/version metadata is capped at 128 UTF-8 bytes; the supplied UUID is preserved.

#### `install_process_default`

<pre />

Install before handing out default handles. Once used, inert handles are never silently upgraded to a different startup mode.

#### `process_default`

<pre />

Return the installed process context or initialize a disabled default.

Install enabled settings before the first lookup. Early disabled handles are never implicitly upgraded by logger or plugin construction.

#### `limits`

<pre />

Configured capacities, independently of current occupancy or disablement.

#### `source`

<pre />

Source incarnation shared by every observation from this context.

#### `reader`

<pre />

Issue a read capability without materializing or allocating a query page.

#### `snapshot`

<pre />

Capture a bounded page through this context's reader.

The lease holds a query permit until dropped. Reads never reset counters or pin history; configured disablement is returned explicitly. The query is borrowed only during capture and can be reused after this call.

#### `register_component`

<pre />

Reserve a component vocabulary and return its producer lease.

Admission cannot displace active summaries. The final recorder drop closes the component. Use [`Self::register_owned_component`](/reference/api/rust-library-reference/nemo-relay/diagnostics/struct-diagnostics) for explicit close and refresh authority. Disabled mode returns an inert recorder.

#### `register_owned_component`

<pre />

Reserve a component and separately issue owner and producer capabilities.

The owner can close or rotate this registration. Disabled mode issues inert handles without an active identity or backend reservation. Admission failures are explicit and recorded in reserved loss accounting.

#### `subscribe_projection`

<pre />

Attach a bounded subscriber to approved operational summaries. Restricted retained evidence is never supplied to projection callbacks.

Callbacks run outside the store lock, may run concurrently, and have isolated panics. Disabled mode retains no callback and returns an inert guard. Arbitrary callback captures and retained copies remain caller-owned.

#### `subscribe_fallible_projection`

<pre />

Attach a subscriber that reports bounded conversion or delivery failure.

Errors update projection-loss accounting without undoing numeric acceptance. Separate publication workspaces cannot pin history. Disabled mode retains no callback and returns an inert guard.

#### `memory_usage`

<pre />

Inspect reserved backend bytes and occupancy without changing evidence.

Inspection scans admitted slots and detail-block metadata without allocating. Disabled contexts report zero backend capacity. Lightweight facade state, caller-owned copies, thread stacks, and independent outputs are excluded.

## Trait Implementations

### `impl Clone for Diagnostics`

<pre />

#### `clone`

<pre />

#### `clone_from`

<pre />

### `impl Debug for Diagnostics`

<pre />

#### `fmt`

<pre />

### `impl Default for Diagnostics`

<pre />

#### `default`

<pre />