> 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 Classification

> Shared classification payload for producers, projections, and decoded evidence.

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 Classification { /* private fields */ }
```

Shared classification payload for producers, projections, and decoded evidence.

Typed constructors validate built-in code/cause pairs and borrow their stable names. Decoded future names remain opaque. Core validates recording input and resolves admitted identifiers before changing counters or retaining evidence. Transport adapters must bound received names before materializing owned data. Private fields prevent mutation after construction. Explicit opaque-name construction and deserialization preserve evidence without asserting validity.

```rust
use nemo_relay_types::diagnostics::{Classification, SuccessCode};
let mut value = Classification::success(SuccessCode::SinkInitialized);
value.canonical_code = "different.name".into();
```

## Implementations

### `impl Classification`

<pre />

#### `from_opaque_names`

<pre />

Preserve names from a wire payload or an admitted extension descriptor. This does not validate catalogue membership or authorize recording. Core revalidates every recording input, including values decoded with Serde.

#### `into_names`

<pre />

Consume the payload without cloning borrowed names or owned buffers.

#### `new`

<pre />

Validate the required cause and the catalogue entry's permitted classes.

#### `failure`

<pre />

Classify a failure using an explicitly supported cause.

#### `success`

<pre />

Classify an observed success, without clearing previous failures.

#### `notice`

<pre />

Classify an observed notice, without inventing a failure cause.

#### `code`

<pre />

Borrow the canonical name, including an opaque future name.

#### `failure_class`

<pre />

Borrow the observed cause name without interpreting unfamiliar values.

## Trait Implementations

### `impl Clone for Classification`

<pre />

#### `clone`

<pre />

#### `clone_from`

<pre />

### `impl Debug for Classification`

<pre />

#### `fmt`

<pre />

### `impl<'de> Deserialize<'de> for Classification`

<pre />

#### `deserialize`

<pre />

### `impl Hash for Classification`

<pre />

#### `hash`

<pre />

#### `hash_slice`

<pre />

### `impl PartialEq for Classification`

<pre />

#### `eq`

<pre />

#### `ne`

<pre />

### `impl Serialize for Classification`

<pre />

#### `serialize`

<pre />

### `impl Eq for Classification`

<pre />

### `impl StructuralPartialEq for Classification`

<pre />