> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/relay/_mcp/server. # nemo-relay-ffi > C FFI layer for NeMo Relay. 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`. C FFI layer for NeMo Relay. This crate exposes the NeMo Relay core runtime as a C-compatible shared library. It is consumed by the Go bindings via CGo and regenerates the committed `nemo_relay.h` header through `cbindgen` during Cargo builds. All exported symbols use the `nemo_relay_` prefix. ## Middleware Pipeline When a tool or LLM call is executed end-to-end via the `_execute` functions, the runtime applies the following middleware pipeline in order: 1. **Request intercepts** - transform the request before guardrails. 2. **Sanitize-request guardrails** - validate/sanitize the request. 3. **Conditional-execution guardrails** - gate whether the call proceeds. 4. **Execution intercepts** - optionally replace the call implementation. 5. **Sanitize-response guardrails** - validate/sanitize the response. ## Error Handling Every `extern "C"` function returns an [`error::NemoRelayStatus`](/reference/api/rust-library-reference/nemo-relay-ffi/error/enum-nemorelaystatus) code. On failure, call [`error::nemo_relay_last_error`](/reference/api/rust-library-reference/nemo-relay-ffi/error/fn-nemo-relay-last-error) on the same thread to retrieve a human-readable error description. The error is stored in thread-local storage and is valid until the next FFI call on that thread. ## Memory Ownership All opaque handles (`FfiScopeHandle`, `FfiToolHandle`, `FfiLLMHandle`, etc.) are heap-allocated and must be freed through their corresponding `nemo_relay_*_free` functions. C strings returned by accessor functions must be freed with `nemo_relay_string_free`. ## Modules * [`api`](/reference/api/rust-library-reference/nemo-relay-ffi/api) - Top-level FFI entry points (scope, tool, LLM, guardrail, intercept, subscriber, ATIF exporter). Tool calls accept an optional `tool_call_id` and LLM calls accept an optional `model_name` for ATIF trajectory correlation. ATIF exporter functions (`nemo_relay_atif_exporter_*`) create, register, export, and clear trajectory data. * [`types`](/reference/api/rust-library-reference/nemo-relay-ffi/types) - C-compatible struct and enum definitions, plus event accessor functions (`nemo_relay_event_input`, `_output`, `_model_name`, `_tool_call_id`, `_parent_uuid`, `_scope_type`) and the `FfiAtifExporter` opaque handle. * [`error`](/reference/api/rust-library-reference/nemo-relay-ffi/error) - Status codes and thread-local error storage. * [`callable`](/reference/api/rust-library-reference/nemo-relay-ffi/callable) - C function pointer typedefs and wrapper functions. * [`convert`](/reference/api/rust-library-reference/nemo-relay-ffi/convert) - JSON and C-string conversion utilities. > C FFI layer for NeMo Relay. ## Docs - [Module api](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api.md): Top-level FFI API functions exported as `extern "C"`. - [Struct FfiStream](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/struct-ffistream.md): Opaque stream handle for consuming LLM streaming responses chunk by chunk. Use `nemo_relay_stream_next` to poll and `nemo_relay_stream_free` to release. - [Function nemo_relay_adaptive_build_cache_telemetry_event](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-build-cache-telemetry-event.md): Build one cache telemetry event as JSON. - [Function nemo_relay_adaptive_runtime_bind_scope](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-bind-scope.md): Bind ACG request rewrites to a scope. - [Function nemo_relay_adaptive_runtime_build_cache_request_facts](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-build-cache-request-facts.md): Build cache request facts as JSON. - [Function nemo_relay_adaptive_runtime_create](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-create.md): Create an owned adaptive runtime handle from config JSON. - [Function nemo_relay_adaptive_runtime_deregister](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-deregister.md): Deregister configured adaptive runtime features. - [Function nemo_relay_adaptive_runtime_register](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-register.md): Register configured adaptive runtime features. - [Function nemo_relay_adaptive_runtime_report_json](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-report-json.md): Return the runtime construction report as JSON. - [Function nemo_relay_adaptive_runtime_shutdown](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-shutdown.md): Shut down the adaptive runtime and consume its Rust runtime state. - [Function nemo_relay_adaptive_runtime_wait_for_idle](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-wait-for-idle.md): Wait until the adaptive telemetry drain has processed pending events. - [Function nemo_relay_adaptive_set_latency_sensitivity](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-set-latency-sensitivity.md): Set manual latency sensitivity on the current scope. - [Function nemo_relay_adaptive_validate_config](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-validate-config.md): Validate an adaptive config document and return the diagnostics report as JSON. - [Function nemo_relay_anthropic_messages_codec_new](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-anthropic-messages-codec-new.md): Create a new Anthropic Messages API codec handle. - [Function nemo_relay_atif_exporter_clear](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atif-exporter-clear.md): Clears all collected events from the exporter. - [Function nemo_relay_atif_exporter_create](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atif-exporter-create.md): Creates a new ATIF exporter. - [Function nemo_relay_atif_exporter_deregister](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atif-exporter-deregister.md): Deregisters the exporter subscriber. - [Function nemo_relay_atif_exporter_export](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atif-exporter-export.md): Exports collected events as an ATIF trajectory JSON string. - [Function nemo_relay_atif_exporter_register](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atif-exporter-register.md): Registers the exporter as an event subscriber. - [Function nemo_relay_atof_exporter_create](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-create.md): Creates a new filesystem-backed ATOF JSONL exporter. - [Function nemo_relay_atof_exporter_create_from_json](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-create-from-json.md): Creates a new ATOF exporter from a JSON config object. - [Function nemo_relay_atof_exporter_deregister](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-deregister.md): Deregisters the ATOF exporter subscriber. - [Function nemo_relay_atof_exporter_force_flush](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-force-flush.md): Outside a native subscriber callback, waits for queued subscriber delivery, then flushes the configured file sink or asks the configured stream sink to drain for up to its timeout. - [Function nemo_relay_atof_exporter_path](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-path.md): Returns the ATOF exporter output path as a string when its sink is a file. - [Function nemo_relay_atof_exporter_register](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-register.md): Registers the ATOF exporter as an event subscriber. - [Function nemo_relay_atof_exporter_shutdown](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-shutdown.md): Outside a native subscriber callback, waits for queued subscriber delivery, then flushes the configured file sink or asks the configured stream sink to drain and close up to its timeout. - [Function nemo_relay_capture_propagation_context_json](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-capture-propagation-context-json.md): Serialize the current causal parent as a versioned propagation context. - [Function nemo_relay_capture_propagation_context_with_root_json](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-capture-propagation-context-with-root-json.md): Serialize the current causal parent with an application-supplied root UUID. - [Function nemo_relay_capture_rootless_propagation_context_json](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-capture-rootless-propagation-context-json.md): Serialize the current causal parent without a propagation root. - [Function nemo_relay_capture_traceparent](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-capture-traceparent.md): Capture the current Relay context as a W3C `traceparent` header value. - [Function nemo_relay_deregister_conditional_middleware_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-conditional-middleware-guardrail.md): Deregister a global conditional middleware guardrail. - [Function nemo_relay_deregister_event_metadata_injector](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-event-metadata-injector.md): Deregister a global event metadata injector. - [Function nemo_relay_deregister_llm_conditional_execution_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-llm-conditional-execution-guardrail.md): Deregister an LLM conditional execution guardrail by name. - [Function nemo_relay_deregister_llm_execution_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-llm-execution-intercept.md): Deregister an LLM execution intercept by name. - [Function nemo_relay_deregister_llm_request_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-llm-request-intercept.md): Deregister an LLM request intercept by name. - [Function nemo_relay_deregister_llm_sanitize_request_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-llm-sanitize-request-guardrail.md): Deregister an LLM request sanitization guardrail by name. - [Function nemo_relay_deregister_llm_sanitize_response_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-llm-sanitize-response-guardrail.md): Deregister an LLM response sanitization guardrail by name. - [Function nemo_relay_deregister_llm_stream_execution_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-llm-stream-execution-intercept.md): Deregister an LLM streaming execution intercept by name. - [Function nemo_relay_deregister_mark_sanitize_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-mark-sanitize-guardrail.md): Deregister a global mark event sanitizer. - [Function nemo_relay_deregister_plugin](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-plugin.md): Deregister a plugin by kind. - [Function nemo_relay_deregister_scope_sanitize_end_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-scope-sanitize-end-guardrail.md): Deregister a global scope-end event sanitizer. - [Function nemo_relay_deregister_scope_sanitize_start_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-scope-sanitize-start-guardrail.md): Deregister a global scope-start event sanitizer. - [Function nemo_relay_deregister_subscriber](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-subscriber.md): Deregister an event subscriber by name. - [Function nemo_relay_deregister_tool_conditional_execution_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-tool-conditional-execution-guardrail.md): Deregister a tool conditional execution guardrail by name. - [Function nemo_relay_deregister_tool_execution_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-tool-execution-intercept.md): Deregister a tool execution intercept by name. - [Function nemo_relay_deregister_tool_request_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-tool-request-intercept.md): Deregister a tool request intercept by name. - [Function nemo_relay_deregister_tool_sanitize_request_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-tool-sanitize-request-guardrail.md): Deregister a tool request sanitization guardrail by name. - [Function nemo_relay_deregister_tool_sanitize_response_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-tool-sanitize-response-guardrail.md): Deregister a tool response sanitization guardrail by name. - [Function nemo_relay_event](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-event.md): Emit a named lifecycle event. - [Function nemo_relay_event_v2](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-event-v2.md): Emit a named lifecycle event with optional data schema and log severity. - [Function nemo_relay_flush_subscribers](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-flush-subscribers.md): Wait for subscriber callbacks queued before this call and events emitted transitively by those callbacks to finish. - [Function nemo_relay_gemini_generate_content_codec_new](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-gemini-generate-content-codec-new.md): Create a new Gemini generateContent API codec handle. - [Function nemo_relay_get_handle](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-get-handle.md): Retrieve the current scope handle from the thread-local scope stack. - [Function nemo_relay_initialize_default_logging](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-initialize-default-logging.md): Initializes the Go binding runtime and installs default operational logging. - [Function nemo_relay_list_plugin_kinds_json](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-list-plugin-kinds-json.md): Return the registered plugin kinds as JSON. - [Function nemo_relay_list_runtime_registrations](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-list-runtime-registrations.md): List global gateable runtime registrations as JSON. - [Function nemo_relay_llm_call](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-call.md): Begin a manual LLM call lifecycle span. - [Function nemo_relay_llm_call_end](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-call-end.md): End a manual LLM call lifecycle span. - [Function nemo_relay_llm_call_execute](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-call-execute.md): Execute an LLM call end-to-end: run conditional-execution guardrails (on raw request), then request intercepts, sanitize-request guardrails, execution intercepts, the callback, and sanitize-response guardrails. On rejection, only a standalone Mark event is emitted (no Start/End pair) and `GuardrailRejected` is returned. Blocks the calling thread until completion. - [Function nemo_relay_llm_conditional_execution](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-conditional-execution.md): Run the registered LLM conditional execution guardrail chain. - [Function nemo_relay_llm_request_intercept_outcome_json_new](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-request-intercept-outcome-json-new.md): Allocate canonical JSON for a C LLM request-intercept callback result. - [Function nemo_relay_llm_request_intercept_outcome_json_new_v2](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-request-intercept-outcome-json-new-v2.md): Allocate canonical JSON for a C LLM request-intercept callback result, including optional plugin-neutral optimization contributions. - [Function nemo_relay_llm_request_intercepts](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-request-intercepts.md): Run the registered LLM request intercept chain on the given request. - [Function nemo_relay_llm_sanitize_request_codec_decode](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-sanitize-request-codec-decode.md): Decode a request through a callback-scoped sanitizer codec capability. - [Function nemo_relay_llm_sanitize_request_codec_encode](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-sanitize-request-codec-encode.md): Encode normalized request changes through a callback-scoped codec capability. - [Function nemo_relay_llm_sanitize_response_codec_decode](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-sanitize-response-codec-decode.md): Decode a response through a callback-scoped sanitizer codec capability. - [Function nemo_relay_llm_stream_call_execute](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-stream-call-execute.md): Execute a streaming LLM call end-to-end. Conditional-execution guardrails run first on the raw request. Returns a stream handle that can be polled with `nemo_relay_stream_next`. Blocks until the stream is set up. - [Function nemo_relay_metric](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-metric.md): Emit an atomic metric measurement mark from typed C measurements. - [Function nemo_relay_metric_json](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-metric-json.md): Emit an atomic metric measurement mark from canonical JSON. - [Function nemo_relay_observability_component_spec_json](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-observability-component-spec-json.md): Wrap an observability config JSON object as a top-level plugin component. - [Function nemo_relay_observability_default_config_json](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-observability-default-config-json.md): Return the default observability plugin config as JSON. - [Function nemo_relay_observability_plugin_kind](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-observability-plugin-kind.md): Return the built-in observability plugin kind. - [Function nemo_relay_openai_chat_codec_new](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-openai-chat-codec-new.md): Create a new OpenAI Chat Completions codec handle. - [Function nemo_relay_openai_responses_codec_new](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-openai-responses-codec-new.md): Create a new OpenAI Responses API codec handle. - [Function nemo_relay_otel_log_subscriber_create](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-log-subscriber-create.md): Creates an independently managed OpenTelemetry log subscriber. - [Function nemo_relay_otel_log_subscriber_create_v2](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-log-subscriber-create-v2.md): Creates an independently managed OpenTelemetry log subscriber with `header_env` support. - [Function nemo_relay_otel_log_subscriber_deregister](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-log-subscriber-deregister.md): Deregisters a subscriber by name from the shared subscriber registry. - [Function nemo_relay_otel_log_subscriber_force_flush](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-log-subscriber-force-flush.md): Flushes queued Relay events and OTLP log batches. - [Function nemo_relay_otel_log_subscriber_register](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-log-subscriber-register.md): Registers an OpenTelemetry log subscriber globally. - [Function nemo_relay_otel_log_subscriber_runtime_diagnostics_json](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-log-subscriber-runtime-diagnostics-json.md): Return a bounded JSON snapshot of runtime diagnostics for this subscriber. - [Function nemo_relay_otel_log_subscriber_shutdown](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-log-subscriber-shutdown.md): Shuts down the OpenTelemetry logger provider. - [Function nemo_relay_otel_metric_subscriber_create](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-metric-subscriber-create.md): Creates an independently managed OpenTelemetry metric subscriber. - [Function nemo_relay_otel_metric_subscriber_create_v2](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-metric-subscriber-create-v2.md): Creates an independently managed OpenTelemetry metric subscriber with `header_env` support. - [Function nemo_relay_otel_metric_subscriber_deregister](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-metric-subscriber-deregister.md): Deregisters a subscriber by name from the shared subscriber registry. - [Function nemo_relay_otel_metric_subscriber_force_flush](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-metric-subscriber-force-flush.md): Flushes queued Relay events and collects current metric aggregates. - [Function nemo_relay_otel_metric_subscriber_register](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-metric-subscriber-register.md): Registers an OpenTelemetry metric subscriber globally. - [Function nemo_relay_otel_metric_subscriber_runtime_diagnostics_json](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-metric-subscriber-runtime-diagnostics-json.md): Return a bounded JSON snapshot of runtime diagnostics for this subscriber. - [Function nemo_relay_otel_metric_subscriber_shutdown](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-metric-subscriber-shutdown.md): Shuts down the OpenTelemetry meter provider and performs final collection. - [Function nemo_relay_otel_subscriber_create](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-create.md): Creates one typed OpenTelemetry exporter subscriber. - [Function nemo_relay_otel_subscriber_create_with_projection_options](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-create-with-projection-options.md): Creates one typed OpenTelemetry exporter subscriber with projection controls. - [Function nemo_relay_otel_subscriber_create_with_projection_options_v2](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-create-with-projection-options-v2.md): Creates one typed OpenTelemetry exporter subscriber with projection, metadata, and lineage controls. - [Function nemo_relay_otel_subscriber_create_with_projection_options_v3](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-create-with-projection-options-v3.md): Creates one typed OpenTelemetry exporter subscriber with projection, metadata, and lineage controls. - [Function nemo_relay_otel_subscriber_create_with_projection_options_v4](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-create-with-projection-options-v4.md): Creates one typed OpenTelemetry exporter subscriber with projection and metadata controls. - [Function nemo_relay_otel_subscriber_deregister](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-deregister.md): Deregisters the OpenTelemetry subscriber by name. - [Function nemo_relay_otel_subscriber_force_flush](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-force-flush.md): Forces a flush of finished spans through the exporter. - [Function nemo_relay_otel_subscriber_register](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-register.md): Registers the OpenTelemetry subscriber as an event subscriber. - [Function nemo_relay_otel_subscriber_runtime_diagnostics_json](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-runtime-diagnostics-json.md): Return a bounded JSON snapshot of runtime diagnostics for this subscriber. - [Function nemo_relay_otel_subscriber_shutdown](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-shutdown.md): Shuts down the underlying tracer provider. - [Function nemo_relay_plugin_context_register_event_metadata_injector](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-event-metadata-injector.md): Register an event metadata injector into a plugin context. - [Function nemo_relay_plugin_context_register_llm_conditional_execution_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-llm-conditional-execution-guardrail.md): Register an LLM conditional-execution guardrail into the plugin registration context. - [Function nemo_relay_plugin_context_register_llm_execution_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-llm-execution-intercept.md): Register an LLM execution intercept into the plugin registration context. - [Function nemo_relay_plugin_context_register_llm_request_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-llm-request-intercept.md): Register an LLM request intercept into the plugin registration context. - [Function nemo_relay_plugin_context_register_llm_sanitize_request_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-llm-sanitize-request-guardrail.md): Register an LLM sanitize-request guardrail into the plugin registration context. - [Function nemo_relay_plugin_context_register_llm_sanitize_response_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-llm-sanitize-response-guardrail.md): Register an LLM sanitize-response guardrail into the plugin registration context. - [Function nemo_relay_plugin_context_register_llm_stream_execution_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-llm-stream-execution-intercept.md): Register an LLM stream execution intercept into the plugin registration context. - [Function nemo_relay_plugin_context_register_mark_sanitize_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-mark-sanitize-guardrail.md): Register a mark event sanitizer into a plugin context. - [Function nemo_relay_plugin_context_register_scope_sanitize_end_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-scope-sanitize-end-guardrail.md): Register a scope-end event sanitizer into a plugin context. - [Function nemo_relay_plugin_context_register_scope_sanitize_start_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-scope-sanitize-start-guardrail.md): Register a scope-start event sanitizer into a plugin context. - [Function nemo_relay_plugin_context_register_subscriber](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-subscriber.md): Register an event subscriber into the plugin registration context. - [Function nemo_relay_plugin_context_register_tool_conditional_execution_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-tool-conditional-execution-guardrail.md): Register a tool conditional-execution guardrail into the plugin registration context. - [Function nemo_relay_plugin_context_register_tool_execution_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-tool-execution-intercept.md): Register a tool execution intercept into the plugin registration context. - [Function nemo_relay_plugin_context_register_tool_request_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-tool-request-intercept.md): Register a tool request intercept into the plugin registration context. - [Function nemo_relay_plugin_context_register_tool_sanitize_request_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-tool-sanitize-request-guardrail.md): Register a tool sanitize-request guardrail into the plugin registration context. - [Function nemo_relay_plugin_context_register_tool_sanitize_response_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-tool-sanitize-response-guardrail.md): Register a tool sanitize-response guardrail into the plugin registration context. - [Function nemo_relay_plugin_host_activation_close](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-host-activation-close.md): Close one owned plugin-host activation. - [Function nemo_relay_plugin_host_activation_is_active](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-host-activation-is-active.md): Report whether an owned plugin-host activation is still active. - [Function nemo_relay_plugin_host_activation_report_json](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-host-activation-report-json.md): Return the current report retained by an owned plugin-host activation. - [Function nemo_relay_plugin_initialize](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-initialize.md): Initialize the unified static and dynamic plugin host from core-owned `plugins.toml` discovery. - [Function nemo_relay_plugin_validate](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-validate.md): Validate dynamic plugins without loading plugin code or acquiring the host lease. - [Function nemo_relay_plugin_validate_exact](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-validate-exact.md): Validate only the supplied static plugin configuration. - [Function nemo_relay_pop_scope](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-pop-scope.md): Pop a scope from the scope stack by its handle. - [Function nemo_relay_propagation_context_to_traceparent](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-propagation-context-to-traceparent.md): Convert a rooted propagation-context JSON value to a W3C `traceparent`. - [Function nemo_relay_push_scope](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-push-scope.md): Push a new scope onto the scope stack. - [Function nemo_relay_register_conditional_middleware_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-conditional-middleware-guardrail.md): Register a global conditional middleware guardrail. - [Function nemo_relay_register_event_metadata_injector](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-event-metadata-injector.md): Register a global event metadata injector. - [Function nemo_relay_register_llm_conditional_execution_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-llm-conditional-execution-guardrail.md): Register an LLM conditional execution guardrail. The callback decides whether an LLM call should proceed. - [Function nemo_relay_register_llm_execution_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-llm-execution-intercept.md): Register an LLM execution intercept following the middleware chain pattern. The callback receives `(request, next_fn, next_ctx)` - call `next_fn(request, next_ctx)` to invoke the next intercept or the original LLM call, or skip calling it to short-circuit. - [Function nemo_relay_register_llm_request_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-llm-request-intercept.md): Register an LLM request intercept. The callback can transform the `LlmRequest` before it reaches the LLM provider. - [Function nemo_relay_register_llm_sanitize_request_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-llm-sanitize-request-guardrail.md): Register an LLM request sanitizer. The callback receives the emitted request first and per-call codec context second; null omits observability. - [Function nemo_relay_register_llm_sanitize_response_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-llm-sanitize-response-guardrail.md): Register an LLM response sanitization guardrail. The callback can inspect and modify the LLM response after it is received. - [Function nemo_relay_register_llm_stream_execution_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-llm-stream-execution-intercept.md): Register an LLM streaming execution intercept following the middleware chain pattern. The callback receives `(request, next_fn, next_ctx)` - call `next_fn(request, next_ctx)` to invoke the next intercept or the original streaming LLM call, or skip calling it to short-circuit. - [Function nemo_relay_register_mark_sanitize_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-mark-sanitize-guardrail.md): Register a global mark event sanitizer. - [Function nemo_relay_register_plugin](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-plugin.md): Register a plugin backed by foreign callbacks. - [Function nemo_relay_register_scope_sanitize_end_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-scope-sanitize-end-guardrail.md): Register a global scope-end event sanitizer. - [Function nemo_relay_register_scope_sanitize_start_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-scope-sanitize-start-guardrail.md): Register a global scope-start event sanitizer. - [Function nemo_relay_register_subscriber](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-subscriber.md): Register an event subscriber. The callback is invoked for every lifecycle event emitted by the runtime. - [Function nemo_relay_register_tool_conditional_execution_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-tool-conditional-execution-guardrail.md): Register a tool conditional execution guardrail. The callback decides whether a tool call should proceed. Returns an error message to reject, or null to allow. - [Function nemo_relay_register_tool_execution_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-tool-execution-intercept.md): Register a tool execution intercept following the middleware chain pattern. The callback receives `(context_json, next_fn, next_ctx)`, where `context_json` contains `tool_name`, `args`, and `tool_call_id`. - [Function nemo_relay_register_tool_request_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-tool-request-intercept.md): Register a tool request intercept. The callback can transform tool arguments before execution. Runs after request guardrails in the middleware pipeline. - [Function nemo_relay_register_tool_sanitize_request_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-tool-sanitize-request-guardrail.md): Register a tool request sanitization guardrail. The callback can inspect and modify tool arguments before the tool executes. - [Function nemo_relay_register_tool_sanitize_response_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-tool-sanitize-response-guardrail.md): Register a tool response sanitization guardrail. The callback can inspect and modify tool results after the tool executes. - [Function nemo_relay_scope_deregister_event_metadata_injector](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-event-metadata-injector.md): Deregister an event metadata injector owned by an active scope. - [Function nemo_relay_scope_deregister_llm_conditional_execution_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-llm-conditional-execution-guardrail.md): Deregister a scope-local LLM conditional execution guardrail by name. - [Function nemo_relay_scope_deregister_llm_execution_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-llm-execution-intercept.md): Deregister a scope-local LLM execution intercept by name. - [Function nemo_relay_scope_deregister_llm_request_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-llm-request-intercept.md): Deregister a scope-local LLM request intercept by name. - [Function nemo_relay_scope_deregister_llm_sanitize_request_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-llm-sanitize-request-guardrail.md): Deregister a scope-local LLM request sanitization guardrail by name. - [Function nemo_relay_scope_deregister_llm_sanitize_response_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-llm-sanitize-response-guardrail.md): Deregister a scope-local LLM response sanitization guardrail by name. - [Function nemo_relay_scope_deregister_llm_stream_execution_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-llm-stream-execution-intercept.md): Deregister a scope-local LLM streaming execution intercept by name. - [Function nemo_relay_scope_deregister_mark_sanitize_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-mark-sanitize-guardrail.md): Deregister a scope-local mark event sanitizer. - [Function nemo_relay_scope_deregister_scope_sanitize_end_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-scope-sanitize-end-guardrail.md): Deregister a scope-local scope-end event sanitizer. - [Function nemo_relay_scope_deregister_scope_sanitize_start_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-scope-sanitize-start-guardrail.md): Deregister a scope-local scope-start event sanitizer. - [Function nemo_relay_scope_deregister_subscriber](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-subscriber.md): Deregister a scope-local event subscriber by name. - [Function nemo_relay_scope_deregister_tool_conditional_execution_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-tool-conditional-execution-guardrail.md): Deregister a scope-local tool conditional execution guardrail by name. - [Function nemo_relay_scope_deregister_tool_execution_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-tool-execution-intercept.md): Deregister a scope-local tool execution intercept by name. - [Function nemo_relay_scope_deregister_tool_request_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-tool-request-intercept.md): Deregister a scope-local tool request intercept by name. - [Function nemo_relay_scope_deregister_tool_sanitize_request_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-tool-sanitize-request-guardrail.md): Deregister a scope-local tool request sanitization guardrail by name. - [Function nemo_relay_scope_deregister_tool_sanitize_response_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-tool-sanitize-response-guardrail.md): Deregister a scope-local tool response sanitization guardrail by name. - [Function nemo_relay_scope_register_event_metadata_injector](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-event-metadata-injector.md): Register an event metadata injector owned by an active scope. - [Function nemo_relay_scope_register_llm_conditional_execution_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-llm-conditional-execution-guardrail.md): Register a scope-local LLM conditional execution guardrail. - [Function nemo_relay_scope_register_llm_execution_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-llm-execution-intercept.md): Register a scope-local LLM execution intercept following the middleware chain pattern. - [Function nemo_relay_scope_register_llm_request_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-llm-request-intercept.md): Register a scope-local LLM request intercept. - [Function nemo_relay_scope_register_llm_sanitize_request_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-llm-sanitize-request-guardrail.md): Register a scope-local LLM request sanitization guardrail. - [Function nemo_relay_scope_register_llm_sanitize_response_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-llm-sanitize-response-guardrail.md): Register a scope-local LLM response sanitization guardrail. - [Function nemo_relay_scope_register_llm_stream_execution_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-llm-stream-execution-intercept.md): Register a scope-local LLM streaming execution intercept following the middleware chain pattern. - [Function nemo_relay_scope_register_mark_sanitize_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-mark-sanitize-guardrail.md): Register a scope-local mark event sanitizer. - [Function nemo_relay_scope_register_scope_sanitize_end_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-scope-sanitize-end-guardrail.md): Register a scope-local scope-end event sanitizer. - [Function nemo_relay_scope_register_scope_sanitize_start_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-scope-sanitize-start-guardrail.md): Register a scope-local scope-start event sanitizer. - [Function nemo_relay_scope_register_subscriber](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-subscriber.md): Register a scope-local event subscriber. - [Function nemo_relay_scope_register_tool_conditional_execution_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-tool-conditional-execution-guardrail.md): Register a scope-local tool conditional execution guardrail. - [Function nemo_relay_scope_register_tool_execution_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-tool-execution-intercept.md): Register a scope-local tool execution intercept following the middleware chain pattern. - [Function nemo_relay_scope_register_tool_request_intercept](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-tool-request-intercept.md): Register a scope-local tool request intercept. - [Function nemo_relay_scope_register_tool_sanitize_request_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-tool-sanitize-request-guardrail.md): Register a scope-local tool request sanitization guardrail. - [Function nemo_relay_scope_register_tool_sanitize_response_guardrail](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-tool-sanitize-response-guardrail.md): Register a scope-local tool response sanitization guardrail. - [Function nemo_relay_scope_stack_active](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-stack-active.md): Returns whether the current execution context has an explicitly-initialized scope stack. - [Function nemo_relay_scope_stack_capture_thread](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-stack-capture-thread.md): Capture the current thread-local scope stack binding. - [Function nemo_relay_scope_stack_create](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-stack-create.md): Create a new isolated scope stack with its own root scope. - [Function nemo_relay_scope_stack_create_from_propagation_json](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-stack-create-from-propagation-json.md): Create an isolated scope stack from propagation-context JSON. - [Function nemo_relay_scope_stack_restore_thread](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-stack-restore-thread.md): Restore and free a captured thread-local scope stack binding. - [Function nemo_relay_scope_stack_set_thread](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-stack-set-thread.md): Bind an isolated scope stack to the current OS thread. - [Function nemo_relay_shutdown_default_logging](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-shutdown-default-logging.md): Shuts down and releases the default operational logging runtime. - [Function nemo_relay_stream_close](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-stream-close.md): Stop a stream producer and wait for cleanup to complete. - [Function nemo_relay_stream_free](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-stream-free.md): Free a stream handle and release its resources. - [Function nemo_relay_stream_next](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-stream-next.md): Poll the next chunk from a streaming LLM response. Blocks until a chunk is available. - [Function nemo_relay_tool_call](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-tool-call.md): Begin a manual tool call lifecycle span. - [Function nemo_relay_tool_call_end](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-tool-call-end.md): End a manual tool call lifecycle span. - [Function nemo_relay_tool_call_execute](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-tool-call-execute.md): Execute a tool call end-to-end: run conditional-execution guardrails (on raw args), then request intercepts, sanitize-request guardrails, execution intercepts, the callback, and sanitize-response guardrails. On rejection, only a standalone Mark event is emitted (no Start/End pair) and `GuardrailRejected` is returned. Blocks the calling thread until completion. - [Function nemo_relay_tool_call_execute_v2](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-tool-call-execute-v2.md): Execute a tool call end-to-end with an optional external tool call ID. - [Function nemo_relay_tool_conditional_execution](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-tool-conditional-execution.md): Run the registered tool conditional execution guardrail chain. - [Function nemo_relay_tool_request_intercepts](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-tool-request-intercepts.md): Run the registered tool request intercept chain on the given arguments. - [Module callable](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable.md): C function pointer typedefs and wrapper functions for FFI callbacks. - [Struct Nemo Relay LlmSanitize Request Context](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/struct-nemorelayllmsanitizerequestcontext.md): Codec identity supplied to an LLM sanitizer. `codec_id` is null for `None` and `Opaque`, and is valid only for the duration of the callback. - [Struct Nemo Relay LlmSanitize Response Context](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/struct-nemorelayllmsanitizeresponsecontext.md): Directional codec context supplied to an LLM response sanitizer. - [Enum Nemo Relay LlmSanitize Codec Kind](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/enum-nemorelayllmsanitizecodeckind.md): Codec identity kind supplied to an LLM sanitizer. - [Function wrap_codec_fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-codec-fn.md): Wrap a pair of C codec callbacks into an `Arc`. - [Function wrap_collector_fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-collector-fn.md): Wrap a C collector callback into a `Box Result<()> + Send>` for use by the core runtime. Each intercepted chunk Json is serialized to a JSON string and passed to the callback. - [Function wrap_conditional_middleware_guardrail_fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-conditional-middleware-guardrail-fn.md): Wrap a C conditional middleware guardrail callback for the core runtime. - [Function wrap_event_metadata_injector_fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-event-metadata-injector-fn.md): Wrap a C event metadata injector callback into a Rust closure. - [Function wrap_event_sanitize_fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-event-sanitize-fn.md): Wrap a C event sanitizer callback into a Rust closure. - [Function wrap_event_subscriber](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-event-subscriber.md): Wrap a C event subscriber callback into a Rust closure. - [Function wrap_finalizer_fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-finalizer-fn.md): Wrap a C finalizer callback into a `Box Json + Send>` for use by the core runtime. The callback is invoked exactly once when the stream is exhausted. The returned C string is parsed as JSON and then freed. - [Function wrap_llm_conditional_fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-llm-conditional-fn.md): Wrap a C LLM conditional callback into a Rust closure. - [Function wrap_llm_exec_fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-llm-exec-fn.md): Wrap a C LLM execution callback into an async Rust closure. The C callback receives an `LlmRequest` serialized as a JSON string. - [Function wrap_llm_exec_intercept_fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-llm-exec-intercept-fn.md): Wrap a C LLM execution intercept callback into an `Arc ...>`. - [Function wrap_llm_request_intercept_fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-llm-request-intercept-fn.md): Wrap a C LLM request intercept callback (annotated-aware) into a Rust `LlmRequestInterceptFn` closure. The callback receives the intercept name, the opaque `FfiLLMRequest`, and the annotated JSON (or null). It writes one owned canonical outcome JSON string. - [Function wrap_llm_sanitize_request_fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-llm-sanitize-request-fn.md): Wrap a C LLM request sanitizer into a Rust closure. - [Function wrap_llm_sanitize_response_fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-llm-sanitize-response-fn.md): Wrap a C LLM response sanitizer into a Rust closure. - [Function wrap_llm_stream_exec_fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-llm-stream-exec-fn.md): Wrap a C LLM execution callback into an async Rust closure that returns a stream. The C callback returns the full response as a single JSON string, which is emitted as a single-item stream of Json values. - [Function wrap_llm_stream_exec_intercept_fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-llm-stream-exec-intercept-fn.md): Wrap a C LLM stream execution intercept callback. Since the C callback returns a single string (not a real stream), this wraps it as a single-item stream, same as `wrap_llm_stream_exec_fn`. - [Function wrap_tool_conditional_fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-tool-conditional-fn.md): Wrap a C tool conditional callback into a Rust closure for use by the core runtime. - [Function wrap_tool_exec_fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-tool-exec-fn.md): Wrap a C tool execution callback into an async Rust closure. - [Function wrap_tool_exec_intercept_fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-tool-exec-intercept-fn.md): Wrap a C tool execution intercept callback into a `ToolExecutionFn`. - [Function wrap_tool_request_intercept_fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-tool-request-intercept-fn.md): Wrap a C tool request intercept callback into a Rust closure for use by the core runtime. - [Function wrap_tool_sanitize_fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-tool-sanitize-fn.md): Wrap a C tool sanitize callback into a Rust closure for use by the core runtime. - [Type Alias Nemo Relay Codec Decode Cb](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelaycodecdecodecb.md): Callback for Codec decode: translates an opaque `FfiLLMRequest` into an `AnnotatedLLMRequest` JSON string. Returns a heap-allocated C string on success, or null on error (after setting the last error message). - [Type Alias Nemo Relay Codec Decode Fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelaycodecdecodefn.md): Nullable version of `NemoRelayCodecDecodeCb` for use as an optional parameter in FFI execute functions. Pass null to indicate no codec. - [Type Alias Nemo Relay Codec Encode Cb](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelaycodecencodecb.md): Callback for Codec encode: merges structured changes back into opaque request content. Receives the annotated request as a JSON C string and the original `FfiLLMRequest`. Returns a heap-allocated JSON C string representing the new `LlmRequest` content on success, or null on error. - [Type Alias Nemo Relay Codec Encode Fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelaycodecencodefn.md): Nullable version of `NemoRelayCodecEncodeCb` for use as an optional parameter in FFI execute functions. Pass null to indicate no codec. - [Type Alias Nemo Relay Collector Cb](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelaycollectorcb.md): Callback for collecting intercepted stream chunks. Invoked with each chunk (after stream execution intercepts have been applied) as a null-terminated C string. The string is only valid for the duration of the call. - [Type Alias Nemo Relay Conditional Middleware Guardrail Cb](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayconditionalmiddlewareguardrailcb.md): Callback for a conditional middleware guardrail. `kinds_json` is a JSON array of configured runtime-registration kind strings. `kinds_json` and `registration_name` are borrowed for the callback invocation only. Returns NULL to enable the target or a reason string allocated compatibly with `nemo_relay_string_free` to disable it. Ownership of a non-null return value transfers to Relay. - [Type Alias Nemo Relay Event Metadata Injector Cb](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayeventmetadatainjectorcb.md): Callback for event metadata injection. - [Type Alias Nemo Relay Event Sanitize Cb](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayeventsanitizecb.md): Callback for mark and scope event sanitizers. The returned JSON string transfers to Relay and is freed exactly once. - [Type Alias Nemo Relay Event Subscriber Cb](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayeventsubscribercb.md): Callback for event subscribers. Invoked on each lifecycle event emitted by the runtime. The `FfiEvent` pointer is only valid for the duration of the call. - [Type Alias Nemo Relay Finalizer Cb](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayfinalizercb.md): Callback for finalizing a collected stream. Invoked once when the stream is exhausted. Must return a JSON C string representing the aggregated response. The returned string must be allocated with `malloc` or equivalent; the runtime will free it. - [Type Alias Nemo Relay Free Fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayfreefn.md): Optional destructor for user data passed to callbacks. Called when the runtime no longer needs the associated callback. - [Type Alias Nemo Relay LlmConditional Cb](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayllmconditionalcb.md): Callback for LLM conditional execution guardrails. Returns NULL to allow execution, or an error message string to reject. - [Type Alias Nemo Relay LlmExec Cb](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayllmexeccb.md): Callback for LLM execution (default callable). Receives a native JSON C string, returns the response as a JSON C string. - [Type Alias Nemo Relay LlmExec Intercept Cb](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayllmexecinterceptcb.md): Callback for LLM execution intercepts with middleware chain support. Receives native JSON C string plus a `next` callback and its context. - [Type Alias Nemo Relay LlmExec Next Fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayllmexecnextfn.md): Runtime-provided "next" callback for LLM execution middleware chain. Takes a native JSON C string, returns a response JSON C string. `next_ctx` is borrowed and valid only until the intercept callback returns; callers must not retain it or invoke `next_fn` asynchronously. The returned string belongs to the caller and must be released with `nemo_relay_string_free`. - [Type Alias Nemo Relay LlmRequest Intercept Cb](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayllmrequestinterceptcb.md): C callback type for LLM request intercepts with unified annotated-aware signature. Receives the intercept name, the opaque `FfiLLMRequest`, and optionally the annotated request as a JSON C string (null if no Codec resolved). Writes one owned canonical outcome JSON string to `out_outcome_json`. Any non-null string written there must be allocated by `nemo_relay_llm_request_intercept_outcome_json_new` or by an allocation compatible with `nemo_relay_string_free`. Ownership transfers to Relay when the callback returns; the callback must not free or reuse the string afterward. Relay frees it exactly once, even when the callback returns an error status. With a Codec, the outcome must preserve request content and return the annotation; only request headers and annotation fields are writable. Returns `NemoRelayStatus`. - [Type Alias Nemo Relay LlmSanitize Request Cb](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayllmsanitizerequestcb.md): LLM request sanitizer. It receives the request first and its codec context second. Return null to omit the observability payload. The request is borrowed, but returning that same pointer is supported as a pass-through. Any other non-null result transfers ownership to Relay. - [Type Alias Nemo Relay LlmSanitize Response Cb](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayllmsanitizeresponsecb.md): LLM response sanitizer. It receives response JSON first and its codec context second. Return null to omit the observability payload. The response is borrowed, but returning that same pointer is supported as a pass-through. Any other non-null result transfers ownership to Relay. - [Type Alias Nemo Relay Plugin Register Cb](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelaypluginregistercb.md): Callback for plugin registration. Receives plugin config JSON and a plugin context pointer that is only valid for the duration of the call. - [Type Alias Nemo Relay Plugin Validate Cb](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelaypluginvalidatecb.md): Callback for plugin validation. Receives plugin config JSON and returns a JSON array of diagnostics. - [Type Alias Nemo Relay Tool Conditional Cb](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelaytoolconditionalcb.md): Callback for tool conditional execution guardrails. Receives tool name and arguments as JSON. Returns NULL to allow execution, or an error message string to reject. - [Type Alias Nemo Relay Tool Exec Cb](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelaytoolexeccb.md): Callback for tool execution (default callable). Receives arguments as JSON and returns a serialized `ToolExecutionResult` with required `result` and optional `annotation` fields. The returned string must be allocated with `malloc` or equivalent. - [Type Alias Nemo Relay Tool Exec Intercept Cb](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelaytoolexecinterceptcb.md): Callback for tool execution intercepts. Receives arguments as JSON plus a `next` callback and its context. Call `next_fn(args, next_ctx)` to invoke the next layer in the middleware chain, or return directly to short-circuit. The `result` and optional `annotation` fields are passed to the remaining middleware and application; `pending_marks` are Relay-owned lifecycle metadata emitted after the tool-end event and are not included in the application-visible result. The returned JSON must contain a `result` field and may contain `annotation` and `pending_marks` fields. The returned string must be allocated with `malloc` or an equivalent allocation compatible with `nemo_relay_string_free`. Ownership transfers to Relay when the callback returns; the callback must not free or reuse the string afterward, and Relay frees it exactly once. Tool execution intercept callback receiving the full call context. - [Type Alias Nemo Relay Tool Exec Next Fn](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelaytoolexecnextfn.md): Runtime-provided "next" callback for tool execution middleware chain. Call this from an intercept to invoke the next layer (or original function). The returned string contains a serialized `ToolExecutionResult`. `next_ctx` is borrowed and valid only until the intercept callback returns; callers must not retain it or invoke `next_fn` asynchronously. The returned string belongs to the caller and must be released with `nemo_relay_string_free`. - [Type Alias Nemo Relay Tool Sanitize Cb](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelaytoolsanitizecb.md): Callback for tool request/response sanitization guardrails and intercepts. Receives tool name and arguments as JSON, returns sanitized arguments as JSON. The returned string must be allocated with `malloc` or equivalent. - [Module convert](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/convert.md): Conversion utilities between C strings/JSON and Rust types. - [Function c_str_to_json](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/convert/fn-c-str-to-json.md): Parse a null-terminated C string as JSON. Returns `None` on error and sets last_error. - [Function c_str_to_opt_json](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/convert/fn-c-str-to-opt-json.md): Parse a null-terminated C string to an optional JSON value. Returns `Ok(None)` for null pointers, `Ok(Some(v))` for valid JSON. - [Function c_str_to_string](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/convert/fn-c-str-to-string.md): Parse a C string to a Rust String. Returns Err status on failure. - [Function json_to_c_string](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/convert/fn-json-to-c-string.md): Convert a JSON value to a library-owned C string. The caller must free with `nemo_relay_string_free`. - [Function nemo_relay_string_free](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/convert/fn-nemo-relay-string-free.md): Free a C string previously returned by any `nemo_relay_*` accessor function. Passing null is a safe no-op. - [Function str_to_c_string](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/convert/fn-str-to-c-string.md): Convert a Rust &str to a library-owned C string. - [Function unix_micros_to_opt_timestamp](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/convert/fn-unix-micros-to-opt-timestamp.md): Parse an optional Unix timestamp in microseconds since epoch to UTC. - [Module error](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/error.md): Error handling for the FFI layer. - [Enum Nemo Relay Status](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/error/enum-nemorelaystatus.md): Status codes returned by all FFI functions. - [Function clear_last_error](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/error/fn-clear-last-error.md): Clear the thread-local last-error message. - [Function last_error_message](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/error/fn-last-error-message.md): Retrieve the last error message set on this thread, if any. - [Function nemo_relay_last_error](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/error/fn-nemo-relay-last-error.md): Retrieve the last error message set on this thread, or null if no error has occurred since the last `clear_last_error` call. - [Function nemo_relay_set_last_error_message](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/error/fn-nemo-relay-set-last-error-message.md): Set the thread-local last-error message from foreign code. - [Function set_last_error](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/error/fn-set-last-error.md): Store an error message in thread-local storage for later retrieval. - [Function status_from_error](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/error/fn-status-from-error.md): Convert an `FlowError` to an `NemoRelayStatus`, storing the error message in thread-local storage. - [Function status_from_plugin_error](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/error/fn-status-from-plugin-error.md): Convert a `PluginError` to an `NemoRelayStatus`, storing the error message in thread-local storage. - [Module types](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types.md): C-compatible types exposed through the FFI boundary. - [Struct FfiAdaptive Runtime](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-ffiadaptiveruntime.md): Opaque owned adaptive runtime handle. - [Struct FfiAtif Exporter](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-ffiatifexporter.md): Opaque ATIF exporter handle. - [Struct FfiAtof Exporter](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-ffiatofexporter.md): Opaque ATOF JSONL exporter handle. - [Struct FfiCodec Handle](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-fficodechandle.md): Opaque handle carrying both request and response codec trait objects. - [Struct FfiEvent](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-ffievent.md): Opaque wrapper around a lifecycle event emitted by the runtime. - [Struct FfiLLM Handle](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-ffillmhandle.md): Opaque handle representing an active LLM call. - [Struct FfiLLM Request](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-ffillmrequest.md): Opaque wrapper around an LLM request (headers, content). - [Struct FfiLlm Sanitize Request Codec](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-ffillmsanitizerequestcodec.md): Borrowed, callback-scoped request codec capability supplied to an LLM sanitizer. - [Struct FfiLlm Sanitize Response Codec](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-ffillmsanitizeresponsecodec.md): Borrowed, callback-scoped response codec capability supplied to an LLM sanitizer. - [Struct FfiOpen Telemetry LogSubscriber](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-ffiopentelemetrylogsubscriber.md): Opaque OpenTelemetry log subscriber handle. - [Struct FfiOpen Telemetry Metric Subscriber](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-ffiopentelemetrymetricsubscriber.md): Opaque OpenTelemetry metric subscriber handle. - [Struct FfiOpen Telemetry Subscriber](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-ffiopentelemetrysubscriber.md): Opaque OpenTelemetry subscriber handle. - [Struct FfiPlugin Context](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-ffiplugincontext.md): Opaque plugin registration context. - [Struct FfiPlugin Host Activation](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-ffipluginhostactivation.md): Opaque owned static and dynamic plugin host activation. - [Struct FfiScope Handle](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-ffiscopehandle.md): Opaque handle representing an active execution scope. - [Struct FfiScope Stack](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-ffiscopestack.md): Opaque handle to an isolated scope stack for per-request/per-task isolation. - [Struct FfiThread Scope Stack Binding](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-ffithreadscopestackbinding.md): Opaque handle to a captured thread-local scope stack binding. - [Struct FfiTool Handle](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-ffitoolhandle.md): Opaque handle representing an active tool call. - [Struct Nemo Relay Metric Measurement](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-nemorelaymetricmeasurement.md): C representation of one typed metric SDK recording operation. - [Enum Nemo Relay Scope Type](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/enum-nemorelayscopetype.md): The type of scope in the agent execution hierarchy. - [Constant NEMO_RELAY_LOG_SEVERITY_DEBUG](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/constant-nemo-relay-log-severity-debug.md): Diagnostic information. - [Constant NEMO_RELAY_LOG_SEVERITY_ERROR](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/constant-nemo-relay-log-severity-error.md): Error condition. - [Constant NEMO_RELAY_LOG_SEVERITY_INFO](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/constant-nemo-relay-log-severity-info.md): Normal informational event. - [Constant NEMO_RELAY_LOG_SEVERITY_TRACE](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/constant-nemo-relay-log-severity-trace.md): Fine-grained tracing information. - [Constant NEMO_RELAY_LOG_SEVERITY_WARN](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/constant-nemo-relay-log-severity-warn.md): Warning condition. - [Constant NEMO_RELAY_METRIC_KIND_COUNTER](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/constant-nemo-relay-metric-kind-counter.md): Monotonic additive counter. - [Constant NEMO_RELAY_METRIC_KIND_GAUGE](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/constant-nemo-relay-metric-kind-gauge.md): Current sampled value. - [Constant NEMO_RELAY_METRIC_KIND_HISTOGRAM](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/constant-nemo-relay-metric-kind-histogram.md): Distribution sample. - [Constant NEMO_RELAY_METRIC_KIND_UNSPECIFIED](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/constant-nemo-relay-metric-kind-unspecified.md): Unspecified metric kind. This value is invalid for a measurement. - [Constant NEMO_RELAY_METRIC_KIND_UP_DOWN_COUNTER](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/constant-nemo-relay-metric-kind-up-down-counter.md): Additive counter that may increase or decrease. - [Constant NEMO_RELAY_METRIC_VALUE_TYPE_F64](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/constant-nemo-relay-metric-value-type-f64.md): Read `f64_value`. - [Constant NEMO_RELAY_METRIC_VALUE_TYPE_I64](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/constant-nemo-relay-metric-value-type-i64.md): Read `i64_value`. - [Constant NEMO_RELAY_METRIC_VALUE_TYPE_U64](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/constant-nemo-relay-metric-value-type-u64.md): Read `u64_value`. - [Constant NEMO_RELAY_METRIC_VALUE_TYPE_UNSPECIFIED](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/constant-nemo-relay-metric-value-type-unspecified.md): Unspecified metric value type. This value is invalid for a measurement. - [Function nemo_relay_adaptive_runtime_free](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-adaptive-runtime-free.md): Free an adaptive runtime handle previously returned by `nemo_relay_adaptive_runtime_create`. - [Function nemo_relay_atif_exporter_free](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-atif-exporter-free.md): Free an ATIF exporter handle previously returned by `nemo_relay_atif_exporter_create`. - [Function nemo_relay_atof_exporter_free](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-atof-exporter-free.md): Free an ATOF JSONL exporter handle previously returned by `nemo_relay_atof_exporter_create`. - [Function nemo_relay_codec_free](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-codec-free.md): Free a codec handle previously returned by one of the codec constructor functions (`nemo_relay_openai_chat_codec_new`, etc.). - [Function nemo_relay_event_annotated_request](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-annotated-request.md): Return the annotated request from an LLM start event as a JSON C string, or null if not available (non-LLM events, or no codec was active). Caller must free the result with `nemo_relay_string_free`. - [Function nemo_relay_event_annotated_response](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-annotated-response.md): Return the annotated response from an LLM end event as a JSON C string, or null if not available (non-LLM events, or no response codec was active). Caller must free the result with `nemo_relay_string_free`. - [Function nemo_relay_event_atof_version](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-atof-version.md): Return the ATOF version as a C string. - [Function nemo_relay_event_attributes](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-attributes.md): Return the raw attribute bitfield for an event, or 0 if it has none. - [Function nemo_relay_event_attributes_json](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-attributes-json.md): Return ATOF attributes as a JSON string array. - [Function nemo_relay_event_category](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-category.md): Return the ATOF category as a C string, or null if absent. - [Function nemo_relay_event_category_profile](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-category-profile.md): Return the ATOF category profile as a JSON C string, or null if absent. - [Function nemo_relay_event_data](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-data.md): Return the event data as a JSON C string, or null if no data is set. Caller must free the result with `nemo_relay_string_free`. - [Function nemo_relay_event_data_schema](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-data-schema.md): Return the Agent Trajectory Observability Format (ATOF) data schema as a JSON C string, or null if absent. - [Function nemo_relay_event_free](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-free.md): Free an event object. - [Function nemo_relay_event_input](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-input.md): Return the event input as a JSON C string, or null if no input is set. Caller must free the result with `nemo_relay_string_free`. - [Function nemo_relay_event_json](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-json.md): Return the canonical subscriber event JSON as a C string. Caller must free the result with `nemo_relay_string_free`. - [Function nemo_relay_event_kind](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-kind.md): Return the event discriminator as a C string. Caller must free the result with `nemo_relay_string_free`. - [Function nemo_relay_event_metadata](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-metadata.md): Return the event metadata as a JSON C string, or null if no metadata is set. Caller must free the result with `nemo_relay_string_free`. - [Function nemo_relay_event_model_name](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-model-name.md): Return the event model name as a C string, or null if no model name is set. Caller must free the result with `nemo_relay_string_free`. - [Function nemo_relay_event_name](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-name.md): Return the name of an event as a C string, or null if unnamed. Caller must free the result with `nemo_relay_string_free`. - [Function nemo_relay_event_output](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-output.md): Return the event output as a JSON C string, or null if no output is set. Caller must free the result with `nemo_relay_string_free`. - [Function nemo_relay_event_parent_uuid](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-parent-uuid.md): Return the event parent UUID as a C string, or null if no parent UUID is set. Caller must free the result with `nemo_relay_string_free`. - [Function nemo_relay_event_scope_category](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-scope-category.md): Return the ATOF scope category as a C string, or null for mark events. - [Function nemo_relay_event_scope_type](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-scope-type.md): Return the event scope type as a C string, or null if no scope type is set. Caller must free the result with `nemo_relay_string_free`. - [Function nemo_relay_event_timestamp](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-timestamp.md): Return the event timestamp as an RFC 3339 C string. Caller must free the result. - [Function nemo_relay_event_tool_call_id](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-tool-call-id.md): Return the event tool call ID as a C string, or null if no tool call ID is set. Caller must free the result with `nemo_relay_string_free`. - [Function nemo_relay_event_uuid](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-event-uuid.md): Return the UUID of an event as a C string. Caller must free the result. - [Function nemo_relay_llm_handle_attributes](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-llm-handle-attributes.md): Return the bitfield attributes of an LLM handle. Returns 0 if `ptr` is null. - [Function nemo_relay_llm_handle_free](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-llm-handle-free.md): Free an LLM handle previously returned by the runtime. - [Function nemo_relay_llm_handle_name](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-llm-handle-name.md): Return the name of an LLM handle as a C string. Caller must free the result. - [Function nemo_relay_llm_handle_parent_uuid](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-llm-handle-parent-uuid.md): Return the parent scope UUID of an LLM handle, or null if none. Caller must free the result with `nemo_relay_string_free`. - [Function nemo_relay_llm_handle_uuid](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-llm-handle-uuid.md): Return the UUID of an LLM handle as a C string. Caller must free the result. - [Function nemo_relay_llm_request_content](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-llm-request-content.md): Return the content of an LLM request as a JSON C string. Caller must free the result. - [Function nemo_relay_llm_request_free](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-llm-request-free.md): Free an LLM request object. - [Function nemo_relay_llm_request_headers](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-llm-request-headers.md): Return the headers of an LLM request as a JSON C string. Caller must free the result. - [Function nemo_relay_llm_request_new](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-llm-request-new.md): Create a new LLM request object. Returns a heap-allocated `FfiLLMRequest` that must be freed with `nemo_relay_llm_request_free`. Returns null on invalid input. - [Function nemo_relay_otel_log_subscriber_free](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-otel-log-subscriber-free.md): Free an OpenTelemetry log subscriber handle. - [Function nemo_relay_otel_metric_subscriber_free](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-otel-metric-subscriber-free.md): Free an OpenTelemetry metric subscriber handle. - [Function nemo_relay_otel_subscriber_free](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-otel-subscriber-free.md): Free an OpenTelemetry subscriber handle previously returned by an OpenTelemetry subscriber constructor. - [Function nemo_relay_plugin_host_activation_free](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-plugin-host-activation-free.md): Free a dynamic plugin activation handle previously returned by `nemo_relay_plugin_initialize`. - [Function nemo_relay_scope_handle_attributes](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-scope-handle-attributes.md): Return the bitfield attributes of a scope handle. Returns 0 if `ptr` is null. - [Function nemo_relay_scope_handle_data](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-scope-handle-data.md): Return the scope data as a JSON C string, or null if no data is set. Caller must free the result with `nemo_relay_string_free`. - [Function nemo_relay_scope_handle_free](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-scope-handle-free.md): Free a scope handle previously returned by the runtime. - [Function nemo_relay_scope_handle_metadata](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-scope-handle-metadata.md): Return the scope metadata as a JSON C string, or null if no metadata is set. Caller must free the result with `nemo_relay_string_free`. - [Function nemo_relay_scope_handle_name](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-scope-handle-name.md): Return the name of a scope handle as a C string. Caller must free the result. Returns null if `ptr` is null. - [Function nemo_relay_scope_handle_parent_uuid](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-scope-handle-parent-uuid.md): Return the parent scope UUID as a C string, or null if there is no parent. Caller must free the result with `nemo_relay_string_free`. - [Function nemo_relay_scope_handle_scope_type](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-scope-handle-scope-type.md): Return the scope type of a scope handle. Returns `Unknown` if `ptr` is null. - [Function nemo_relay_scope_handle_uuid](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-scope-handle-uuid.md): Return the UUID of a scope handle as a C string. Caller must free the result with `nemo_relay_string_free`. Returns null if `ptr` is null. - [Function nemo_relay_scope_stack_free](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-scope-stack-free.md): Free a scope stack handle previously returned by `nemo_relay_scope_stack_create`. - [Function nemo_relay_tool_handle_attributes](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-tool-handle-attributes.md): Return the bitfield attributes of a tool handle. Returns 0 if `ptr` is null. - [Function nemo_relay_tool_handle_free](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-tool-handle-free.md): Free a tool handle previously returned by the runtime. - [Function nemo_relay_tool_handle_name](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-tool-handle-name.md): Return the name of a tool handle as a C string. Caller must free the result. - [Function nemo_relay_tool_handle_parent_uuid](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-tool-handle-parent-uuid.md): Return the parent scope UUID of a tool handle, or null if none. Caller must free the result with `nemo_relay_string_free`. - [Function nemo_relay_tool_handle_uuid](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-tool-handle-uuid.md): Return the UUID of a tool handle as a C string. Caller must free the result. - [Type Alias Nemo Relay LogSeverity](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/type-nemorelaylogseverity.md): Integer-backed typed severity for a mark exported as an OpenTelemetry log. - [Type Alias Nemo Relay Metric Kind](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/type-nemorelaymetrickind.md): Integer-backed OpenTelemetry instrument kind for one typed metric measurement. - [Type Alias Nemo Relay Metric Value Type](https://docs.nvidia.com/nemo/relay/v0.9.4/reference/api/rust-library-reference/nemo-relay-ffi/types/type-nemorelaymetricvaluetype.md): Integer-backed numeric representation selected from a typed metric measurement's value fields.