> For clean Markdown of any page, append .md to the page URL. For a task-oriented documentation index, fetch https://docs.nvidia.com/nemo/relay/llms.txt. Use the documentation version matching the installed NeMo Relay package: latest follows the latest stable release, vX.Y.Z identifies a retained release snapshot, and dev documents development changes. Preserve the selected version when following links; do not mix examples or API contracts from different versions. Fetch the relevant section's /llms.txt before individual pages instead of loading a complete version index. # nemo-relay-ffi > C FFI layer for NeMo Relay. Generated from `cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -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. ## Docs - [Module api](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api.md): Top-level FFI API functions exported as `extern "C"`. - [Struct FfiCancellation](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/struct-fficancellation.md): An owned, thread-safe cancellation signal. Calls clone it when they start. Cancelling it does not free it. Release with `nemo_relay_cancellation_free`. - [Struct FfiDiagnostics Reader](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/struct-ffidiagnosticsreader.md): Opaque inspection authority. Caller must not copy, free, or forge the allocation. - [Struct FfiLlm Stream Continuation](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/struct-ffillmstreamcontinuation.md): An owned streaming continuation, retained before its callback returns. - [Struct FfiLlm Stream Source](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/struct-ffillmstreamsource.md): An owned source, transferred to Relay when returned by a streaming callback. - [Struct FfiStream](https://docs.nvidia.com/nemo/relay/v1.0.0/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. - [Constant NEMO_RELAY_CONTENT_SELECT_ALL](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/constant-nemo-relay-content-select-all.md): All parts of a standalone message or content value. - [Constant NEMO_RELAY_CONTENT_SELECT_INSTRUCTIONS](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/constant-nemo-relay-content-select-instructions.md): Top-level request instructions. - [Constant NEMO_RELAY_CONTENT_SELECT_LAST_MESSAGE](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/constant-nemo-relay-content-select-last-message.md): Final supplied request message. - [Constant NEMO_RELAY_CONTENT_SELECT_LAST_USER_MESSAGE](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/constant-nemo-relay-content-select-last-user-message.md): Last user message in the request. - [Constant NEMO_RELAY_CONTENT_SELECT_MESSAGE](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/constant-nemo-relay-content-select-message.md): Request message at the signed index. Negative indices count from the end. - [Constant NEMO_RELAY_CONTENT_SELECT_OUTPUT](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/constant-nemo-relay-content-select-output.md): Current normalized response output. - [Constant NEMO_RELAY_CONTENT_SELECT_SYSTEM_PROMPT](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/constant-nemo-relay-content-select-system-prompt.md): Request instructions or the first system/developer message. - [Constant NEMO_RELAY_CONTENT_SOURCE_CONTENT](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/constant-nemo-relay-content-source-content.md): Standalone message content (string or parts array). - [Constant NEMO_RELAY_CONTENT_SOURCE_MESSAGE](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/constant-nemo-relay-content-source-message.md): Standalone normalized message. - [Constant NEMO_RELAY_CONTENT_SOURCE_REQUEST](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/constant-nemo-relay-content-source-request.md): Normalized LLM request. - [Constant NEMO_RELAY_CONTENT_SOURCE_RESPONSE](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/constant-nemo-relay-content-source-response.md): Normalized LLM response. - [Constant NEMO_RELAY_SKIP_CONDITIONAL_EXECUTION](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/constant-nemo-relay-skip-conditional-execution.md): Skip conditional-execution guardrails for one managed call. - [Constant NEMO_RELAY_SKIP_EXECUTION_INTERCEPTS](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/constant-nemo-relay-skip-execution-intercepts.md): Skip execution intercepts for one managed call (stream intercepts for streams). - [Constant NEMO_RELAY_SKIP_REQUEST_INTERCEPTS](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/constant-nemo-relay-skip-request-intercepts.md): Skip request intercepts for one managed call. - [Function nemo_relay_adaptive_build_cache_telemetry_event](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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_application_execution_context_normalize_json](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-application-execution-context-normalize-json.md): Normalize application context from borrowed UTF-8 bytes to bounded JSON. - [Function nemo_relay_application_execution_context_value_normalize_json](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-application-execution-context-value-normalize-json.md): Normalize one application-data value within the enclosing context budget. - [Function nemo_relay_atif_exporter_clear](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-create.md): Creates a new ATOF exporter from a JSON config object. - [Function nemo_relay_atof_exporter_deregister](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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_runtime_diagnostics_json](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-runtime-diagnostics-json.md): Returns delivery diagnostics recorded by this exporter's stream sink as JSON. - [Function nemo_relay_atof_exporter_shutdown](https://docs.nvidia.com/nemo/relay/v1.0.0/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_cancellation_cancel](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-cancellation-cancel.md): Signal cancellation. It is safe to call more than once. Foreign callbacks must poll the signal or cancel their provider request. Relay cannot force them to stop. - [Function nemo_relay_cancellation_create](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-cancellation-create.md): Create a fresh cancellation signal. - [Function nemo_relay_cancellation_free](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-cancellation-free.md): Release an owned signal after concurrent foreign accesses have stopped. - [Function nemo_relay_cancellation_is_cancelled](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-cancellation-is-cancelled.md): Test whether a signal has been cancelled. - [Function nemo_relay_capture_propagation_context_json](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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_codec_clone](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-codec-clone.md): Clone a codec's owned references. The result has an independent lifetime. - [Function nemo_relay_codec_decode](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-codec-decode.md): Decode an owned codec's request to annotated request JSON. Free the result with `nemo_relay_string_free`. Null indicates failure. Read `nemo_relay_last_error`. - [Function nemo_relay_codec_decode_response](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-codec-decode-response.md): Decode a response into annotated response JSON. Free the result with `nemo_relay_string_free`. Null indicates failure. Read `nemo_relay_last_error`. - [Function nemo_relay_codec_encode](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-codec-encode.md): Merge annotated request JSON into an original request. Returns the complete request JSON with headers and content. Free it with `nemo_relay_string_free`. - [Function nemo_relay_codec_new](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-codec-new.md): Create a request codec, response codec, or both. Built-in providers use null callbacks. `NEMO_RELAY_CODEC_CUSTOM` requires at least one codec direction. Request decode and encode must be provided together. Relay owns callback state when the call starts, even if validation fails. It frees the state exactly once after all native references are released. Unknown providers return null and set the last error. Release a successful result with `nemo_relay_codec_free`. - [Function nemo_relay_current_scope_stack_snapshot_json](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-current-scope-stack-snapshot-json.md): Return the explicit calling context's root-to-top scope identities as JSON. - [Function nemo_relay_deregister_conditional_middleware_guardrail](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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_diagnostics_info_json](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-diagnostics-info-json.md): Inspect core and adapter capacities, occupancy, and logging coverage as JSON. - [Function nemo_relay_diagnostics_memory_json](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-diagnostics-memory-json.md): Inspect canonical diagnostic backing and independently copied resource memory. Free successful output with nemo_relay_string_free. Never initiates collection. - [Function nemo_relay_diagnostics_query_max_bytes](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-diagnostics-query-max-bytes.md): Return the core's maximum encoded embedded diagnostics query size. - [Function nemo_relay_diagnostics_reader](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-diagnostics-reader.md): Obtain an embedded reader without starting or enabling diagnostics. Errors set a stable machine-readable reason in nemo_relay_last_error. - [Function nemo_relay_diagnostics_reader_free](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-diagnostics-reader-free.md): Free a reader once and clear its slot. Null slots are harmless. - [Function nemo_relay_diagnostics_snapshot_json](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-diagnostics-snapshot-json.md): Capture a canonical page. Release successful output with nemo_relay_string_free. The optional query is bounded by the core's encoded query byte limit and uses canonical query fields. Failure always leaves `*out` null. A reader/filter does not restrict authority. - [Function nemo_relay_event](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-event.md): Emit a named lifecycle event with optional data schema and log severity. - [Function nemo_relay_flush_subscribers](https://docs.nvidia.com/nemo/relay/v1.0.0/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_get_handle](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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_inspect_llm_content_json](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-inspect-llm-content-json.md): Inspect a normalized annotation, using NEMO_RELAY_CONTENT_SOURCE_* and NEMO_RELAY_CONTENT_SELECT_* constants. Only SELECT_MESSAGE reads index. Success returns an owned JSON object with ordered parts and text_parts; an absent selection succeeds with a null output. An empty selection of existing content still returns a snapshot. Free a snapshot with nemo_relay_string_free. An invalid selection/index returns InvalidArg. On failure, *out is null and nemo_relay_last_error describes the error on the calling thread. - [Function nemo_relay_list_plugin_kinds_json](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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_handle_retain_optimization_recorder](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-handle-retain-optimization-recorder.md): Retain the optimization recorder owned by a manual LLM call handle. The returned recorder has an independent lifetime and must be freed with `nemo_relay_llm_optimization_recorder_free`. Ending the LLM call closes recording. Later records return `accepted = false`. - [Function nemo_relay_llm_optimization_record](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-optimization-record.md): Record optimization evidence on a borrowed or retained recorder. `accepted` reports whether Relay accepted the record. Rejection does not fail execution. - [Function nemo_relay_llm_optimization_recorder_free](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-optimization-recorder-free.md): Release a retained recorder. Borrowed callback recorders must never be freed. - [Function nemo_relay_llm_optimization_recorder_retain](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-optimization-recorder-retain.md): Retain a borrowed optimization recorder for deferred streaming evidence. Recording ends with the LLM call. Later records return false. Free the owned result with `nemo_relay_llm_optimization_recorder_free`. - [Function nemo_relay_llm_request_intercept_outcome_json_new](https://docs.nvidia.com/nemo/relay/v1.0.0/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, including optional plugin-neutral optimization contributions. - [Function nemo_relay_llm_request_intercepts](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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_log](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-log.md): Emits a structured operational log record for language bindings. - [Function nemo_relay_metric](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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_otel_log_subscriber_create](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-log-subscriber-create.md): Creates an OTLP subscriber with optional TLS file settings. - [Function nemo_relay_otel_log_subscriber_deregister](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-metric-subscriber-create.md): Creates an OTLP subscriber with optional TLS file settings. - [Function nemo_relay_otel_metric_subscriber_deregister](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-create.md): Creates an OTLP subscriber with optional TLS file settings. - [Function nemo_relay_otel_subscriber_deregister](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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_normalize_json](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-propagation-context-normalize-json.md): Validate and canonicalize propagation-context JSON for transport. - [Function nemo_relay_propagation_context_to_traceparent](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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 `(name, request, context, 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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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 `(name, request, context, 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. The response codec in `context` is null because chunks are not complete provider responses. - [Function nemo_relay_register_mark_sanitize_guardrail](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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_resource_metrics_collect_free](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-resource-metrics-collect-free.md): Release a collection handle and cancel its pending wait. - [Function nemo_relay_resource_metrics_collect_poll](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-resource-metrics-collect-poll.md): Check a collection without blocking. `out_done` is false while pending. - [Function nemo_relay_resource_metrics_collect_start](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-resource-metrics-collect-start.md): Start an asynchronous resource metrics collection using the active plugin. - [Function nemo_relay_scope_deregister_event_metadata_injector](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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. The callback receives `(name, request, context, next_fn, next_ctx)`. - [Function nemo_relay_scope_register_llm_request_intercept](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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. The callback receives `(name, request, context, next_fn, next_ctx)`. The response codec in `context` is null. - [Function nemo_relay_scope_register_mark_sanitize_guardrail](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-stack-create.md): Create an isolated scope stack, optionally from propagation-context JSON. - [Function nemo_relay_scope_stack_restore_thread](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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_cancel](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-stream-cancel.md): Stop a stream producer. - [Function nemo_relay_stream_close](https://docs.nvidia.com/nemo/relay/v1.0.0/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_continuation_call](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-stream-continuation-call.md): Invoke a live borrowed or retained streaming continuation. Returns an owned source. - [Function nemo_relay_stream_continuation_callback_data](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-stream-continuation-callback-data.md): Borrow the managed stream's collector/finalizer user data from an interceptor continuation. This lets language bindings associate provider sources with their language owner even when a continuation runs on a different native thread. Returns null for a null continuation or absent callback state. - [Function nemo_relay_stream_continuation_free](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-stream-continuation-free.md): Release a retained continuation. Never free a borrowed next-context. - [Function nemo_relay_stream_continuation_retain](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-stream-continuation-retain.md): Retain a streaming next-context before its interceptor callback returns. The result owns the continuation and its original scope and trace context. - [Function nemo_relay_stream_free](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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_stream_source_cancel](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-stream-source-cancel.md): Signal cancellation. This can run during a source read. - [Function nemo_relay_stream_source_close](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-stream-source-close.md): Cancel and await all source cleanup. Does not free the handle. - [Function nemo_relay_stream_source_create](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-stream-source-create.md): Construct a foreign stream source. Relay owns the state when the call starts, even if it fails. The free callback runs exactly once after reads and close finish. Reads run on blocking workers. They restore the Relay middleware context so callbacks can emit observability events. Close callbacks restore the source creation scope and active trace context. Callbacks can use supplied capabilities and emit observability events. Other API calls, including managed-stream control and flushes, are invalid. - [Function nemo_relay_stream_source_free](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-stream-source-free.md): Release an owned source that has not been transferred to Relay. Close it first to wait for cleanup. - [Function nemo_relay_stream_source_next](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-stream-source-next.md): Read an owned source: 1 chunk, 0 EOF, -1 error. Returned strings are owned. - [Function nemo_relay_tool_call](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-tool-call-execute.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/v1.0.0/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/v1.0.0/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. - [Type Alias Nemo Relay Optional Stream Cancel Fn](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/type-nemorelayoptionalstreamcancelfn.md): Nullable version of `NemoRelayStreamCancelFn`. Pass null to omit this callback. - [Type Alias Nemo Relay Optional Stream Close Fn](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/type-nemorelayoptionalstreamclosefn.md): Nullable version of `NemoRelayStreamCloseFn`. Pass null to omit this callback. - [Type Alias Nemo Relay Optional Stream Read Fn](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/type-nemorelayoptionalstreamreadfn.md): Nullable C representation of `NemoRelayStreamReadFn`. `nemo_relay_stream_source_create` requires a non-null read callback. - [Type Alias Nemo Relay Stream Cancel Fn](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/type-nemorelaystreamcancelfn.md): Signal cancellation promptly. This can run during a read and must unblock it. - [Type Alias Nemo Relay Stream Close Fn](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/type-nemorelaystreamclosefn.md): Close producer resources after reads stop. Return zero on success. Set the last error on failure. - [Type Alias Nemo Relay Stream Read Fn](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/api/type-nemorelaystreamreadfn.md): Pull one JSON chunk: 1 writes an owned string, 0 is EOF, -1 is an error. Set the last error before returning -1. Only one read runs at a time. - [Module callable](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable.md): C function pointer typedefs and wrapper functions for FFI callbacks. - [Struct Nemo Relay Codec Callbacks](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable/struct-nemorelaycodeccallbacks.md): Custom codec callbacks, sharing one user-data allocation and destructor. Request decode and encode must be supplied together. At least one direction must be present. Callbacks can run concurrently and must be thread-safe. - [Struct Nemo Relay LlmExecution Context](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable/struct-nemorelayllmexecutioncontext.md): Directional codec context supplied to an LLM execution intercept. - [Struct Nemo Relay LlmSanitize Request Context](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable/struct-nemorelayllmsanitizerequestcontext.md): Request codec context shared by LLM sanitizer and execution callbacks. `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/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable/struct-nemorelayllmsanitizeresponsecontext.md): Response codec context shared by LLM sanitizer and execution callbacks. - [Struct Stream Callback State](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable/struct-streamcallbackstate.md): Callback ownership and finalizer failures are shared with the managed stream. - [Enum Nemo Relay LlmSanitize Codec Kind](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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_conditional_middleware_guardrail_fn](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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_llm_conditional_fn](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-llm-exec-intercept-fn.md): Wrap a C LLM execution intercept callback. - [Function wrap_llm_request_intercept_fn](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-llm-stream-exec-intercept-fn.md): Adapt a single-value interceptor while retaining the remaining upstream chunks. - [Function wrap_stream_callbacks](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable/fn-wrap-stream-callbacks.md): Wrap the C collector and finalizer callbacks. - [Function wrap_tool_conditional_fn](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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. Supply decode and encode together, or pass null for both. Use a request codec handle or this callback pair, never both. - [Type Alias Nemo Relay Codec Encode Cb](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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. Supply decode and encode together, or pass null for both. Use a request codec handle or this callback pair, never both. - [Type Alias Nemo Relay Codec Response Decode Fn](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelaycodecresponsedecodefn.md): Response decoder callback. Returns caller-allocated annotated-response JSON. Ownership transfers to Relay. Return null and set the last error to report failure. - [Type Alias Nemo Relay Collector Cb](https://docs.nvidia.com/nemo/relay/v1.0.0/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. Non-zero ends the stream. - [Type Alias Nemo Relay Conditional Middleware Guardrail Cb](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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 or closed early. Must return a JSON C string representing the aggregated response. Allocate the returned string with `nemo_relay_string_clone`. The runtime frees the result. - [Type Alias Nemo Relay Free Fn](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayllmexecinterceptcb.md): Callback for LLM execution intercepts with middleware chain support. Receives the managed LLM call name, native JSON C string, execution context, plus a `next` callback and its context. - [Type Alias Nemo Relay LlmExec Next Fn](https://docs.nvidia.com/nemo/relay/v1.0.0/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 Context](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayllmrequestcontext.md): Request codec context exposed to an LLM execution intercept. - [Type Alias Nemo Relay LlmRequest Intercept Cb](https://docs.nvidia.com/nemo/relay/v1.0.0/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 LlmResponse Context](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayllmresponsecontext.md): Response codec context exposed to an LLM execution intercept. - [Type Alias Nemo Relay LlmSanitize Request Cb](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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 LlmStream Exec Cb](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayllmstreamexeccb.md): Create an owned stream source for a provider invocation. Ownership transfers to Relay on return. Return null and set the last error to report failure. - [Type Alias Nemo Relay LlmStream Exec Intercept Cb](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayllmstreamexecinterceptcb.md): Transform a complete stream. Return the owned continuation source or an owned replacement source. Never free or reuse a source after returning it to Relay. - [Type Alias Nemo Relay LlmStream Exec Next Fn](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayllmstreamexecnextfn.md): Invoke the rest of a streaming chain. The continuation expires on callback return. The returned source is owned and can outlive that callback. - [Type Alias Nemo Relay Optional Collector Cb](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayoptionalcollectorcb.md): Nullable version of `NemoRelayCollectorCb`. Pass null to omit this callback. - [Type Alias Nemo Relay Optional Finalizer Cb](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayoptionalfinalizercb.md): Nullable version of `NemoRelayFinalizerCb`. Pass null to omit this callback. - [Type Alias Nemo Relay Optional LlmExec Cb](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayoptionalllmexeccb.md): Nullable version of `NemoRelayLlmExecCb`. Pass null to omit this callback. - [Type Alias Nemo Relay Optional LlmExec Intercept Cb](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayoptionalllmexecinterceptcb.md): Nullable version of `NemoRelayLlmExecInterceptCb`. Pass null to omit this callback. - [Type Alias Nemo Relay Optional LlmStream Exec Cb](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayoptionalllmstreamexeccb.md): Nullable version of `NemoRelayLlmStreamExecCb`. Pass null to omit this callback. - [Type Alias Nemo Relay Optional LlmStream Exec Intercept Cb](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayoptionalllmstreamexecinterceptcb.md): Nullable version of `NemoRelayLlmStreamExecInterceptCb`. Pass null to omit this callback. - [Type Alias Nemo Relay Optional Plugin Validate Cb](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/callable/type-nemorelayoptionalpluginvalidatecb.md): Nullable version of `NemoRelayPluginValidateCb`. Pass null to omit this callback. - [Type Alias Nemo Relay Plugin Register Cb](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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. Allocate the returned string with `nemo_relay_string_clone`. - [Type Alias Nemo Relay Tool Exec Intercept Cb](https://docs.nvidia.com/nemo/relay/v1.0.0/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. Allocate the returned string with `nemo_relay_string_clone`. 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/v1.0.0/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/v1.0.0/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. Allocate the returned string with `nemo_relay_string_clone`. - [Module convert](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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_clone](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/convert/fn-nemo-relay-string-clone.md): Copy a C string into Relay-owned storage for a callback result. Free the result with `nemo_relay_string_free`, or transfer it to Relay. Returns null for null input. - [Function nemo_relay_string_free](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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_last_error_cause_ids](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/error/fn-nemo-relay-last-error-cause-ids.md): Read the opaque callback failure IDs associated with the last error. Writes the number of IDs to `out_count`. An empty list returns null. Read on the same thread as `nemo_relay_last_error`. The returned array is borrowed until the error message or cause IDs change. Do not free it. - [Function nemo_relay_set_last_error_cause_ids](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/error/fn-nemo-relay-set-last-error-cause-ids.md): Copy opaque callback failure IDs into the current last error. Call after `nemo_relay_set_last_error_message` on the same thread. Relay carries every selected ID without changing the error text. A count of zero clears the IDs. The binding owns the data behind each ID. - [Function nemo_relay_set_last_error_message](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-ffillmrequest.md): Opaque wrapper around an LLM request (headers, content). - [Struct FfiLlm Optimization Recorder](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-ffillmoptimizationrecorder.md): Optimization recorder borrowed during an execution callback or independently retained from a callback or manual LLM handle. - [Struct FfiLlm Sanitize Request Codec](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-ffipluginhostactivation.md): Opaque owned static and dynamic plugin host activation. - [Struct FfiResource Metrics Collection](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/types/struct-ffiresourcemetricscollection.md): Opaque handle for an asynchronous resource metrics collection. - [Struct FfiScope Handle](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/types/enum-nemorelayscopetype.md): The type of scope in the agent execution hierarchy. - [Constant NEMO_RELAY_CODEC_ANTHROPIC_MESSAGES](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/types/constant-nemo-relay-codec-anthropic-messages.md): Built-in codec selector for Anthropic Messages. - [Constant NEMO_RELAY_CODEC_CUSTOM](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/types/constant-nemo-relay-codec-custom.md): Select caller-supplied codec callbacks. - [Constant NEMO_RELAY_CODEC_GEMINI_GENERATE_CONTENT](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/types/constant-nemo-relay-codec-gemini-generate-content.md): Built-in codec selector for Gemini generateContent. - [Constant NEMO_RELAY_CODEC_OCI_GENAI](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/types/constant-nemo-relay-codec-oci-genai.md): Built-in codec selector for OCI GenAI chat. - [Constant NEMO_RELAY_CODEC_OPENAI_CHAT](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/types/constant-nemo-relay-codec-openai-chat.md): Built-in codec selector for OpenAI Chat Completions. - [Constant NEMO_RELAY_CODEC_OPENAI_RESPONSES](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/types/constant-nemo-relay-codec-openai-responses.md): Built-in codec selector for OpenAI Responses. - [Constant NEMO_RELAY_LOG_SEVERITY_DEBUG](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-codec-free.md): Free a codec handle previously returned by `nemo_relay_codec_new`. - [Function nemo_relay_event_annotated_request](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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_data](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-llm-handle-data.md): Return the LLM handle data as JSON, or null if absent. Caller must free a non-null result with `nemo_relay_string_free`. Returns null if `ptr` is null. - [Function nemo_relay_llm_handle_free](https://docs.nvidia.com/nemo/relay/v1.0.0/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_metadata](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-llm-handle-metadata.md): Return the LLM handle metadata as JSON, or null if absent. Caller must free a non-null result with `nemo_relay_string_free`. Returns null if `ptr` is null. - [Function nemo_relay_llm_handle_model_name](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-llm-handle-model-name.md): Return the LLM handle model name as a string, or null if absent. Caller must free a non-null result with `nemo_relay_string_free`. Returns null if `ptr` is null. - [Function nemo_relay_llm_handle_name](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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_started_at](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-llm-handle-started-at.md): Return the LLM handle start time as an RFC 3339 string. Caller must free a non-null result with `nemo_relay_string_free`. Returns null if `ptr` is null. - [Function nemo_relay_llm_handle_uuid](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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_started_at](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-scope-handle-started-at.md): Return the scope handle start time as an RFC 3339 string. Caller must free a non-null result with `nemo_relay_string_free`. Returns null if `ptr` is null. - [Function nemo_relay_scope_handle_uuid](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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_data](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-tool-handle-data.md): Return the tool handle data as JSON, or null if absent. Caller must free a non-null result with `nemo_relay_string_free`. Returns null if `ptr` is null. - [Function nemo_relay_tool_handle_free](https://docs.nvidia.com/nemo/relay/v1.0.0/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_metadata](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-tool-handle-metadata.md): Return the tool handle metadata as JSON, or null if absent. Caller must free a non-null result with `nemo_relay_string_free`. Returns null if `ptr` is null. - [Function nemo_relay_tool_handle_name](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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_started_at](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-tool-handle-started-at.md): Return the tool handle start time as an RFC 3339 string. Caller must free a non-null result with `nemo_relay_string_free`. Returns null if `ptr` is null. - [Function nemo_relay_tool_handle_tool_call_id](https://docs.nvidia.com/nemo/relay/v1.0.0/reference/api/rust-library-reference/nemo-relay-ffi/types/fn-nemo-relay-tool-handle-tool-call-id.md): Return the tool handle tool call ID as a string, or null if absent. Caller must free a non-null result with `nemo_relay_string_free`. Returns null if `ptr` is null. - [Function nemo_relay_tool_handle_uuid](https://docs.nvidia.com/nemo/relay/v1.0.0/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/v1.0.0/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/v1.0.0/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/v1.0.0/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.