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

# Module runtime

> Advanced runtime state, callbacks, and scope-stack helpers. Advanced runtime state, callbacks, and scope-stack helpers.

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

Advanced runtime state, callbacks, and scope-stack helpers. Advanced runtime state, callbacks, and scope-stack helpers.

## Re-exports

* `pub use callbacks::EventSubscriberFn;`
* `pub use callbacks::LlmCollectorFn;`
* `pub use callbacks::LlmConditionalFn;`
* `pub use callbacks::LlmExecutionFn;`
* `pub use callbacks::LlmExecutionNextFn;`
* `pub use callbacks::LlmFinalizerFn;`
* `pub use callbacks::LlmJsonStream;`
* `pub use callbacks::LlmRequestInterceptFn;`
* `pub use callbacks::LlmSanitizeRequestFn;`
* `pub use callbacks::LlmSanitizeResponseFn;`
* `pub use callbacks::LlmStreamExecutionFn;`
* `pub use callbacks::LlmStreamExecutionNextFn;`
* `pub use callbacks::ToolConditionalFn;`
* `pub use callbacks::ToolExecutionFn;`
* `pub use callbacks::ToolExecutionNextFn;`
* `pub use callbacks::ToolInterceptFn;`
* `pub use callbacks::ToolSanitizeFn;`
* `pub use global::global_context;`
* `pub use scope_stack::ScopeStack;`
* `pub use scope_stack::ScopeStackHandle;`
* `pub use scope_stack::TASK_SCOPE_STACK;`
* `pub use scope_stack::ThreadScopeStackBinding;`
* `pub use scope_stack::capture_thread_scope_stack;`
* `pub use scope_stack::create_scope_stack;`
* `pub use scope_stack::current_scope_stack;`
* `pub use scope_stack::propagate_scope_to_thread;`
* `pub use scope_stack::restore_thread_scope_stack;`
* `pub use scope_stack::scope_stack_active;`
* `pub use scope_stack::set_thread_scope_stack;`
* `pub use scope_stack::sync_thread_scope_stack;`
* `pub use scope_stack::task_scope_push;`
* `pub use scope_stack::task_scope_remove;`
* `pub use scope_stack::task_scope_top;`
* `pub use state::NemoRelayContextState;`
* `pub use subscriber_dispatcher::flush_subscribers;`

## Modules

* [callbacks](/reference/api/rust-library-reference/nemo-relay/api/runtime/callbacks): Callback type aliases used by the runtime middleware pipeline.
* [global](/reference/api/rust-library-reference/nemo-relay/api/runtime/global): Process-global access to the shared runtime context state.
* [scope\_stack](/reference/api/rust-library-reference/nemo-relay/api/runtime/scope_stack): Scope stack storage and propagation helpers.
* [state](/reference/api/rust-library-reference/nemo-relay/api/runtime/state): Process-global runtime state and middleware-chain builders.
* [subscriber\_dispatcher](/reference/api/rust-library-reference/nemo-relay/api/runtime/subscriber_dispatcher): Asynchronous subscriber delivery for native targets.