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

# Trait Plugin

> Implemented by custom plugins that register runtime middleware.

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

<pre />

Implemented by custom plugins that register runtime middleware.

## Required Methods

#### `plugin_kind`

<pre />

Returns the unique plugin kind string.

#### `validate`

<pre />

Validates one plugin component config.

Returning error-level diagnostics prevents `initialize_plugins(...)` from activating the configuration.

#### `register`

<pre />

Registers runtime middleware/subscribers for one plugin component.

The provided [`PluginRegistrationContext`](/reference/api/rust-library-reference/nemo-relay/plugin/struct-pluginregistrationcontext) is component-scoped. Any error aborts the current initialization and triggers rollback of registrations created during the failed activation attempt.

## Provided Methods

#### `allows_multiple_components`

<pre />

Returns whether the plugin kind can appear multiple times in the config.

Return `false` for singleton components such as the built-in adaptive component.

## Implementors