Skip to navigation

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.

pub enum Result {
    Completed(()),
    Unchanged(()),
    MetadataAdditions(JsonObject),
    EventSanitize(Box<EventSanitizeFields>),
    ToolValue(JsonValue),
    Guardrail(GuardrailDecision),
    LlmRequest(LlmRequest),
    LlmResponse(JsonValue),
    LlmRequestOutcome(Box<LlmRequestInterceptOutcome>),
    ToolExecutionOutcome(ToolExecutionInterceptOutcome),
    Error(WorkerError),
}

Exactly one recognized alternative is required when this message is present.

Variants

Completed(())

Completed(())

Explicit successful completion of a subscriber callback.

Unchanged(())

Unchanged(())

Only request/response LLM sanitizers may report unchanged.

MetadataAdditions(JsonObject)

MetadataAdditions(JsonObject)

Successful open metadata additions from an event metadata injector.

EventSanitize(Box<EventSanitizeFields>)

EventSanitize(Box<EventSanitizeFields>)

Successful replacement fields from an event sanitizer; absent fields are cleared.

ToolValue(JsonValue)

ToolValue(JsonValue)

Successful rewritten application value from a tool sanitizer or request interceptor.

Guardrail(GuardrailDecision)

Guardrail(GuardrailDecision)

Explicit allow or block decision from a conditional guardrail.

LlmRequest(LlmRequest)

LlmRequest(LlmRequest)

Successful rewritten provider request from a request sanitizer.

LlmResponse(JsonValue)

LlmResponse(JsonValue)

Successful provider response from a response sanitizer or execution interceptor.

LlmRequestOutcome(Box<LlmRequestInterceptOutcome>)

LlmRequestOutcome(Box<LlmRequestInterceptOutcome>)

Successful rewritten request, annotation, pending marks, and optimization evidence.

ToolExecutionOutcome(ToolExecutionInterceptOutcome)

ToolExecutionOutcome(ToolExecutionInterceptOutcome)

Successful canonical tool result and ordered pending marks.

Error(WorkerError)

Error(WorkerError)

Callback or downstream domain failure; mutually exclusive with successful results.

Implementations

impl Result

impl Result

encode

pub fn encode(&self, buf: &mut impl BufMut)

Encodes the message to a buffer.

merge

pub fn merge(
    field: &mut Option<Result>,
    tag: u32,
    wire_type: WireType,
    buf: &mut impl Buf,
    ctx: DecodeContext,
) -> Result<(), DecodeError>

Decodes an instance of the message from a buffer, and merges it into self.

encoded_len

pub fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.

Trait Implementations

impl Clone for Result

impl Clone for Result

clone

fn clone(&self) -> Result

clone_from

fn clone_from(&mut self, source: &Self)

impl Debug for Result

impl Debug for Result

fmt

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl PartialEq for Result

impl PartialEq for Result

eq

fn eq(&self, other: &Result) -> bool

ne

fn ne(&self, other: &Rhs) -> bool

impl StructuralPartialEq for Result

impl StructuralPartialEq for Result