Type Alias Nemo Relay LlmRequest Intercept Cb
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.
pub type NemoRelayLlmRequestInterceptCb = unsafe extern "C" fn(user_data: *mut c_void, name: *const c_char, request: *const FfiLLMRequest, annotated_json: *const c_char, out_outcome_json: *mut *mut c_char) -> NemoRelayStatus;
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.