Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.
Context provided to plugin handlers during runtime registration.
Each register_* call both installs the middleware/subscriber into the NeMo Relay runtime and records the inverse deregistration closure so the host can roll back partial setup on failure.
impl PluginRegistrationContextimpl PluginRegistrationContext
newpub fn new() -> Self
Creates an empty plugin registration context.
with_namespacepub fn with_namespace(namespace: impl Into<String>) -> Self
Creates a plugin registration context that namespaces all registration names.
qualify_namepub fn qualify_name(&self, name: &str) -> String
Returns the runtime-qualified name for a plugin-local registration.
Plugin handlers should pass stable component-local names such as "tool" or "subscriber". The host applies the namespace so users do not have to provide component instance ids.
register_subscriberpub fn register_subscriber(
&mut self,
name: &str,
callback: EventSubscriberFn,
) -> Result<()>
Registers an event subscriber and records its rollback closure.
register_llm_request_interceptpub fn register_llm_request_intercept(
&mut self,
name: &str,
priority: i32,
break_chain: bool,
callback: LlmRequestInterceptFn,
) -> Result<()>
Registers an LLM request intercept and records its rollback closure.
register_tool_sanitize_request_guardrailpub fn register_tool_sanitize_request_guardrail(
&mut self,
name: &str,
priority: i32,
callback: ToolSanitizeFn,
) -> Result<()>
Registers a tool sanitize-request guardrail and records its rollback closure.
register_tool_sanitize_response_guardrailpub fn register_tool_sanitize_response_guardrail(
&mut self,
name: &str,
priority: i32,
callback: ToolSanitizeFn,
) -> Result<()>
Registers a tool sanitize-response guardrail and records its rollback closure.
register_tool_conditional_execution_guardrailpub fn register_tool_conditional_execution_guardrail(
&mut self,
name: &str,
priority: i32,
callback: ToolConditionalFn,
) -> Result<()>
Registers a tool conditional-execution guardrail and records its rollback closure.
register_llm_sanitize_request_guardrailpub fn register_llm_sanitize_request_guardrail(
&mut self,
name: &str,
priority: i32,
callback: LlmSanitizeRequestFn,
) -> Result<()>
Registers an LLM sanitize-request guardrail and records its rollback closure.
register_llm_sanitize_response_guardrailpub fn register_llm_sanitize_response_guardrail(
&mut self,
name: &str,
priority: i32,
callback: LlmSanitizeResponseFn,
) -> Result<()>
Registers an LLM sanitize-response guardrail and records its rollback closure.
register_llm_conditional_execution_guardrailpub fn register_llm_conditional_execution_guardrail(
&mut self,
name: &str,
priority: i32,
callback: LlmConditionalFn,
) -> Result<()>
Registers an LLM conditional-execution guardrail and records its rollback closure.
register_llm_execution_interceptpub fn register_llm_execution_intercept(
&mut self,
name: &str,
priority: i32,
callback: LlmExecutionFn,
) -> Result<()>
Registers an LLM execution intercept and records its rollback closure.
register_llm_stream_execution_interceptpub fn register_llm_stream_execution_intercept(
&mut self,
name: &str,
priority: i32,
callback: LlmStreamExecutionFn,
) -> Result<()>
Registers an LLM stream execution intercept and records its rollback closure.
register_tool_request_interceptpub fn register_tool_request_intercept(
&mut self,
name: &str,
priority: i32,
break_chain: bool,
callback: ToolInterceptFn,
) -> Result<()>
Registers a tool request intercept and records its rollback closure.
register_tool_execution_interceptpub fn register_tool_execution_intercept(
&mut self,
name: &str,
priority: i32,
callback: ToolExecutionFn,
) -> Result<()>
Registers a tool execution intercept and records its rollback closure.
add_registrationpub fn add_registration(&mut self, registration: PluginRegistration)
Adds a prebuilt registration to the context.
extend_registrationspub fn extend_registrations(&mut self, registrations: Vec<PluginRegistration>)
Extends the context with prebuilt registrations.
into_registrationspub fn into_registrations(self) -> Vec<PluginRegistration>
Consumes the context and returns the recorded registrations.
impl Default for PluginRegistrationContextimpl Default for PluginRegistrationContext
defaultfn default() -> PluginRegistrationContext