> 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 full documentation content, see https://docs.nvidia.com/nemo/relay/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/relay/_mcp/server.

# Struct Trie Envelope

> Versioned envelope wrapping a prediction trie for JSON persistence.

Generated from `cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi`.

<pre />

Versioned envelope wrapping a prediction trie for JSON persistence.

Wire format matches NAT's `serialization.py`:

```rust
{
  "version": "1.0",
  "generated_at": "2026-03-31T12:00:00+00:00",
  "workflow_name": "my_agent",
  "root": { ... PredictionTrieNode ... }
}
```

## Fields

### `version: String`

Wire-format version string.

### `generated_at: String`

RFC 3339 timestamp indicating when the envelope was generated.

### `workflow_name: String`

Workflow or agent name associated with the trie.

### `root: PredictionTrieNode`

Root trie node.

## Implementations

### `impl TrieEnvelope`

<pre />

#### `new`

<pre />

Create a new envelope with the current timestamp and version.

#### `to_json`

<pre />

Serialize to a JSON string.

#### `from_json`

<pre />

Deserialize from a JSON string.

## Trait Implementations

### `impl Clone for TrieEnvelope`

<pre />

#### `clone`

<pre />

#### `clone_from`

<pre />

### `impl Debug for TrieEnvelope`

<pre />

#### `fmt`

<pre />

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

<pre />

#### `deserialize`

<pre />

### `impl Serialize for TrieEnvelope`

<pre />

#### `serialize`

<pre />