> 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 Plugin Registration Context

> Context provided to plugin handlers during runtime registration.

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

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

Context provided to plugin handlers during runtime registration.

Each `register_*` call both installs the middleware/subscriber into the NeMo Relay runtime and records the inverse deregistration closure so the host can roll back partial setup on failure.

## Implementations

### `impl PluginRegistrationContext`

<pre />

#### `new`

<pre />

Creates an empty plugin registration context.

#### `with_namespace`

<pre />

Creates a plugin registration context that namespaces all registration names.

#### `qualify_name`

<pre />

Returns the runtime-qualified name for a plugin-local registration.

Plugin handlers should pass stable component-local names such as `"tool"` or `"subscriber"`. The host applies the namespace so users do not have to provide component instance ids.

#### `register_subscriber`

<pre />

Registers an event subscriber and records its rollback closure.

#### `register_llm_request_intercept`

<pre />

Registers an LLM request intercept and records its rollback closure.

#### `register_tool_sanitize_request_guardrail`

<pre />

Registers a tool sanitize-request guardrail and records its rollback closure.

#### `register_tool_sanitize_response_guardrail`

<pre />

Registers a tool sanitize-response guardrail and records its rollback closure.

#### `register_tool_conditional_execution_guardrail`

<pre />

Registers a tool conditional-execution guardrail and records its rollback closure.

#### `register_llm_sanitize_request_guardrail`

<pre />

Registers an LLM sanitize-request guardrail and records its rollback closure.

#### `register_llm_sanitize_response_guardrail`

<pre />

Registers an LLM sanitize-response guardrail and records its rollback closure.

#### `register_llm_conditional_execution_guardrail`

<pre />

Registers an LLM conditional-execution guardrail and records its rollback closure.

#### `register_llm_execution_intercept`

<pre />

Registers an LLM execution intercept and records its rollback closure.

#### `register_llm_stream_execution_intercept`

<pre />

Registers an LLM stream execution intercept and records its rollback closure.

#### `register_tool_request_intercept`

<pre />

Registers a tool request intercept and records its rollback closure.

#### `register_tool_execution_intercept`

<pre />

Registers a tool execution intercept and records its rollback closure.

#### `add_registration`

<pre />

Adds a prebuilt registration to the context.

#### `extend_registrations`

<pre />

Extends the context with prebuilt registrations.

#### `into_registrations`

<pre />

Consumes the context and returns the recorded registrations.

## Trait Implementations

### `impl Default for PluginRegistrationContext`

<pre />

#### `default`

<pre />