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

# Enum Optimization Intent

> A single optimization intent emitted by a behavioral model.

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`.

<pre />

A single optimization intent emitted by a behavioral model.

Each variant wraps a dedicated payload struct with fields specific to that intent type. The enum uses internally-tagged JSON representation with the `intent_type` field as the discriminant.

## Variants

### `CacheStability(CacheStabilityIntent)`

<pre />

Cache stability analysis results.

### `ContentExtraction(ContentExtractionIntent)`

<pre />

Content extraction and variable detection.

### `Serialization(SerializationIntent)`

<pre />

Serialization and fanout optimization.

### `Priority(PriorityIntent)`

<pre />

Latency and priority routing.

### `ModelRouting(ModelRoutingIntent)`

<pre />

Model routing and selection.

### `Placement(PlacementIntent)`

<pre />

Context placement optimization.

### `Retention(RetentionIntent)`

<pre />

Cache retention policy.

### `ToolScope(ToolScopeIntent)`

<pre />

Tool scope and phase management.

### `Compression(CompressionIntent)`

<pre />

Content compression.

## Implementations

### `impl OptimizationIntent`

<pre />

#### `discriminant`

<pre />

Returns the intent type discriminant for this intent variant.

## Trait Implementations

### `impl Clone for OptimizationIntent`

<pre />

#### `clone`

<pre />

#### `clone_from`

<pre />

### `impl Debug for OptimizationIntent`

<pre />

#### `fmt`

<pre />

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

<pre />

#### `deserialize`

<pre />

### `impl PartialEq for OptimizationIntent`

<pre />

#### `eq`

<pre />

#### `ne`

<pre />

### `impl Serialize for OptimizationIntent`

<pre />

#### `serialize`

<pre />

### `impl StructuralPartialEq for OptimizationIntent`

<pre />