#[repr(C)]pub struct NemoRelayNativeHostApiV4 {Show 19 fields
pub v3: NemoRelayNativeHostApiV3,
pub async_completion_llm_request_codec_decode: unsafe extern "C" fn(completion: *const NemoRelayNativeAsyncCompletion, request_json: *const NemoRelayNativeString, out: *mut *mut NemoRelayNativeString) -> NemoRelayStatus,
pub async_completion_llm_request_codec_encode: unsafe extern "C" fn(completion: *const NemoRelayNativeAsyncCompletion, annotated_json: *const NemoRelayNativeString, original_json: *const NemoRelayNativeString, out: *mut *mut NemoRelayNativeString) -> NemoRelayStatus,
pub async_completion_llm_response_codec_decode: unsafe extern "C" fn(completion: *const NemoRelayNativeAsyncCompletion, response_json: *const NemoRelayNativeString, out: *mut *mut NemoRelayNativeString) -> NemoRelayStatus,
pub async_next_open_llm_stream: unsafe extern "C" fn(next: *const NemoRelayNativeAsyncNext, request_json: *const NemoRelayNativeString, cb: NemoRelayNativeAsyncLlmStreamOpenCb, user_data: *mut c_void) -> NemoRelayStatus,
pub async_llm_stream_pull: unsafe extern "C" fn(stream: *const NemoRelayNativeLlmAsyncStream, cb: NemoRelayNativeAsyncLlmStreamPullCb, user_data: *mut c_void) -> NemoRelayStatus,
pub async_llm_stream_cancel: unsafe extern "C" fn(stream: *const NemoRelayNativeLlmAsyncStream) -> NemoRelayStatus,
pub async_llm_stream_release: unsafe extern "C" fn(stream: *const NemoRelayNativeLlmAsyncStream),
pub async_completion_retain: unsafe extern "C" fn(completion: *const NemoRelayNativeAsyncCompletion) -> NemoRelayStatus,
pub async_stream_is_backpressured: unsafe extern "C" fn(stream: *const NemoRelayNativeAsyncStream) -> bool,
pub emit_mark_v2: NemoRelayNativeEmitMarkV2Fn,
pub get_runtime_diagnostics: NemoRelayNativeGetRuntimeDiagnosticsFn,
pub plugin_context_runtime: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, out: *mut *const NemoRelayNativePluginRuntime) -> NemoRelayStatus,
pub plugin_runtime_retain: unsafe extern "C" fn(runtime: *const NemoRelayNativePluginRuntime) -> NemoRelayStatus,
pub plugin_runtime_release: unsafe extern "C" fn(runtime: *const NemoRelayNativePluginRuntime),
pub plugin_runtime_list_registrations: unsafe extern "C" fn(runtime: *const NemoRelayNativePluginRuntime, kinds_json: *const NemoRelayNativeString, out_json: *mut *mut NemoRelayNativeString) -> NemoRelayStatus,
pub plugin_runtime_register_conditional_middleware_guardrail: unsafe extern "C" fn(runtime: *const NemoRelayNativePluginRuntime, name: *const NemoRelayNativeString, kinds_json: *const NemoRelayNativeString, registration_name: *const NemoRelayNativeString, reason: *const NemoRelayNativeString, out_handle: *mut *mut NemoRelayNativeString) -> NemoRelayStatus,
pub plugin_runtime_deregister_conditional_middleware_guardrail: unsafe extern "C" fn(runtime: *const NemoRelayNativePluginRuntime, handle: *const NemoRelayNativeString, out_removed: *mut bool) -> NemoRelayStatus,
pub plugin_context_register_conditional_middleware_guardrail: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, kinds_json: *const NemoRelayNativeString, registration_name: *const NemoRelayNativeString, reason: *const NemoRelayNativeString) -> NemoRelayStatus,
}Expand description
ABI-v4 host extension for typed asynchronous middleware, mark options, diagnostics, and activation-owned dynamic gate control.
The complete ABI-v3 table is the prefix, preserving layout compatibility.
Fields§
§v3: NemoRelayNativeHostApiV3Frozen ABI-v3 compatibility prefix.
async_completion_llm_request_codec_decode: unsafe extern "C" fn(completion: *const NemoRelayNativeAsyncCompletion, request_json: *const NemoRelayNativeString, out: *mut *mut NemoRelayNativeString) -> NemoRelayStatusDecodes an LLM request using the request codec attached to completion.
async_completion_llm_request_codec_encode: unsafe extern "C" fn(completion: *const NemoRelayNativeAsyncCompletion, annotated_json: *const NemoRelayNativeString, original_json: *const NemoRelayNativeString, out: *mut *mut NemoRelayNativeString) -> NemoRelayStatusEncodes an annotated LLM request using the request codec attached to completion.
async_completion_llm_response_codec_decode: unsafe extern "C" fn(completion: *const NemoRelayNativeAsyncCompletion, response_json: *const NemoRelayNativeString, out: *mut *mut NemoRelayNativeString) -> NemoRelayStatusDecodes an LLM response using the response codec attached to completion.
async_next_open_llm_stream: unsafe extern "C" fn(next: *const NemoRelayNativeAsyncNext, request_json: *const NemoRelayNativeString, cb: NemoRelayNativeAsyncLlmStreamOpenCb, user_data: *mut c_void) -> NemoRelayStatusOpens an independent pull-based downstream LLM stream.
async_llm_stream_pull: unsafe extern "C" fn(stream: *const NemoRelayNativeLlmAsyncStream, cb: NemoRelayNativeAsyncLlmStreamPullCb, user_data: *mut c_void) -> NemoRelayStatusRequests one item from a pull-based downstream LLM stream.
async_llm_stream_cancel: unsafe extern "C" fn(stream: *const NemoRelayNativeLlmAsyncStream) -> NemoRelayStatusCancels a pull-based downstream LLM stream.
async_llm_stream_release: unsafe extern "C" fn(stream: *const NemoRelayNativeLlmAsyncStream)Releases the plugin-owned stream reference exactly once.
async_completion_retain: unsafe extern "C" fn(completion: *const NemoRelayNativeAsyncCompletion) -> NemoRelayStatusRetains a completion capability for a codec facade that outlives the callback’s original completion reference.
async_stream_is_backpressured: unsafe extern "C" fn(stream: *const NemoRelayNativeAsyncStream) -> boolReturns whether the output queue is currently full.
Use NemoRelayStatus::Backpressured from the individual push or
rejection operation to decide whether that operation must be retried.
emit_mark_v2: NemoRelayNativeEmitMarkV2FnEmits a mark with optional data-schema and telemetry-severity fields.
get_runtime_diagnostics: NemoRelayNativeGetRuntimeDiagnosticsFnReturns a bounded snapshot of active host runtime diagnostics.
plugin_context_runtime: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, out: *mut *const NemoRelayNativePluginRuntime) -> NemoRelayStatusCreates an activation-owned runtime capability from a registration context.
On success, out receives one owned reference. Every owned reference must
be released exactly once with plugin_runtime_release.
plugin_runtime_retain: unsafe extern "C" fn(runtime: *const NemoRelayNativePluginRuntime) -> NemoRelayStatusRetains a runtime capability for a cloned SDK handle.
A successful call creates one additional owned reference.
plugin_runtime_release: unsafe extern "C" fn(runtime: *const NemoRelayNativePluginRuntime)Releases one owned runtime capability reference.
plugin_runtime_list_registrations: unsafe extern "C" fn(runtime: *const NemoRelayNativePluginRuntime, kinds_json: *const NemoRelayNativeString, out_json: *mut *mut NemoRelayNativeString) -> NemoRelayStatusLists global runtime registrations as JSON.
plugin_runtime_register_conditional_middleware_guardrail: unsafe extern "C" fn(runtime: *const NemoRelayNativePluginRuntime, name: *const NemoRelayNativeString, kinds_json: *const NemoRelayNativeString, registration_name: *const NemoRelayNativeString, reason: *const NemoRelayNativeString, out_handle: *mut *mut NemoRelayNativeString) -> NemoRelayStatusRegisters an activation-owned host-resident gate and returns its handle.
plugin_runtime_deregister_conditional_middleware_guardrail: unsafe extern "C" fn(runtime: *const NemoRelayNativePluginRuntime, handle: *const NemoRelayNativeString, out_removed: *mut bool) -> NemoRelayStatusDeregisters an activation-owned gate by opaque handle.
plugin_context_register_conditional_middleware_guardrail: unsafe extern "C" fn(ctx: *mut NemoRelayNativePluginContext, name: *const NemoRelayNativeString, kinds_json: *const NemoRelayNativeString, registration_name: *const NemoRelayNativeString, reason: *const NemoRelayNativeString) -> NemoRelayStatusDeclares a host-resident gate during component registration.
Trait Implementations§
Source§impl Clone for NemoRelayNativeHostApiV4
impl Clone for NemoRelayNativeHostApiV4
Source§fn clone(&self) -> NemoRelayNativeHostApiV4
fn clone(&self) -> NemoRelayNativeHostApiV4
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more