> 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 Nemo Relay Native Async Middleware Kind

> Middleware surface selected by the native async registration hook.

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
#[repr(u32)]pub enum NemoRelayNativeAsyncMiddlewareKind {
Show 14 variants    ToolSanitizeRequest = 0,
    ToolSanitizeResponse = 1,
    ToolConditionalExecution = 2,
    ToolRequestIntercept = 3,
    ToolExecutionIntercept = 4,
    LlmSanitizeRequest = 5,
    LlmSanitizeResponse = 6,
    LlmConditionalExecution = 7,
    LlmRequestIntercept = 8,
    LlmExecutionIntercept = 9,
    LlmStreamExecutionIntercept = 10,
    MarkSanitize = 11,
    ScopeSanitizeStart = 12,
    ScopeSanitizeEnd = 13,
}
```

Middleware surface selected by the native async registration hook.

The host only exposes this through the ABI-v3 extension table. It keeps every asynchronous callback shape uniform while allowing the host to deserialize the surface-specific invocation and result payloads.

## Variants

### `ToolSanitizeRequest = 0`

<pre />

Tool start-event request sanitizer.

### `ToolSanitizeResponse = 1`

<pre />

Tool end-event response sanitizer.

### `ToolConditionalExecution = 2`

<pre />

Tool execution admission guardrail.

### `ToolRequestIntercept = 3`

<pre />

Tool request rewrite intercept.

### `ToolExecutionIntercept = 4`

<pre />

Tool execution intercept with a continuation.

### `LlmSanitizeRequest = 5`

<pre />

LLM start-event request sanitizer.

### `LlmSanitizeResponse = 6`

<pre />

LLM end-event response sanitizer.

### `LlmConditionalExecution = 7`

<pre />

LLM execution admission guardrail.

### `LlmRequestIntercept = 8`

<pre />

LLM request rewrite intercept.

### `LlmExecutionIntercept = 9`

<pre />

LLM execution intercept with a continuation.

### `LlmStreamExecutionIntercept = 10`

<pre />

Reserved legacy discriminant for streaming LLM execution intercepts.

Hosts reject this kind from the generic completion-based registration hook. Use `plugin_context_register_async_stream_middleware` so chunks remain incremental.

### `MarkSanitize = 11`

<pre />

Mark event sanitizer.

### `ScopeSanitizeStart = 12`

<pre />

Scope-start event sanitizer.

### `ScopeSanitizeEnd = 13`

<pre />

Scope-end event sanitizer.

## Trait Implementations

### `impl Clone for NemoRelayNativeAsyncMiddlewareKind`

<pre />

#### `clone`

<pre />

#### `clone_from`

<pre />

### `impl Debug for NemoRelayNativeAsyncMiddlewareKind`

<pre />

#### `fmt`

<pre />

### `impl PartialEq for NemoRelayNativeAsyncMiddlewareKind`

<pre />

#### `eq`

<pre />

#### `ne`

<pre />

### `impl TryFrom<u32> for NemoRelayNativeAsyncMiddlewareKind`

<pre />

#### `Error`

<pre />

#### `try_from`

<pre />

### `impl Copy for NemoRelayNativeAsyncMiddlewareKind`

<pre />

### `impl Eq for NemoRelayNativeAsyncMiddlewareKind`

<pre />

### `impl StructuralPartialEq for NemoRelayNativeAsyncMiddlewareKind`

<pre />