Struct LlmSanitize Request Context
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.
Per-call codec context for LLM request sanitize guardrails.
The context distinguishes no codec, Relay built-ins, runtime-registered codecs, and active codecs with no stable identity.
Implementations
impl LlmSanitizeRequestContext
impl LlmSanitizeRequestContext
with_identity
pub fn with_identity(codec: LlmCodecIdentity) -> Self
Construct a context that carries only a codec identity.
Identity-only contexts do not carry a codec handle, so Self::resolve_codec returns None even when the identity describes an active codec.
for_request_codec
pub fn for_request_codec(codec: Option<Arc<dyn LlmCodec>>) -> Self
Construct request-sanitizer context from the active request codec.
codec
pub fn codec(&self) -> &LlmCodecIdentity
Return the identity of the codec active for this payload direction.
resolve_codec
pub fn resolve_codec(&self) -> Option<Arc<dyn LlmCodec>>
Resolve the active request codec.
Returns None for contexts constructed with Self::with_identity.
Trait Implementations
impl Clone for LlmSanitizeRequestContext
impl Clone for LlmSanitizeRequestContext
clone
fn clone(&self) -> LlmSanitizeRequestContext
clone_from
fn clone_from(&mut self, source: &Self)
impl Debug for LlmSanitizeRequestContext
impl Debug for LlmSanitizeRequestContext
fmt
fn fmt(&self, formatter: &mut Formatter<'_>) -> Result
impl Default for LlmSanitizeRequestContext
impl Default for LlmSanitizeRequestContext
default
fn default() -> LlmSanitizeRequestContext