Skip to navigation

Struct Tool Execution Result

View as Markdown

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 struct ToolExecutionResult {
    pub result: Json,
    pub annotation: Option<Json>,
}

Canonical application-visible result of tool execution.

Relay keeps result and annotation separate. It reads display content and failure status from results that use the shared JSON format. The returned result stays unchanged. Relay copies the annotation without reading its contents.

Fields

result: Json

Application-owned tool result.

annotation: Option<Json>

Optional opaque metadata associated with the result.

Implementations

impl ToolExecutionResult

impl ToolExecutionResult

new

pub fn new(result: Json) -> Self

Create a result without an annotation.

annotated

pub fn annotated(result: Json, annotation: Json) -> Self

Create a result with an opaque annotation.

with_annotation

pub fn with_annotation(self, annotation: Json) -> Self

Replace the opaque annotation while preserving the application result.

without_annotation

pub fn without_annotation(self) -> Self

Remove the annotation while preserving the application result.

Trait Implementations

impl Clone for ToolExecutionResult

impl Clone for ToolExecutionResult

clone

fn clone(&self) -> ToolExecutionResult

clone_from

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

impl Debug for ToolExecutionResult

impl Debug for ToolExecutionResult

fmt

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

impl<'de> Deserialize<'de> for ToolExecutionResult

impl<'de> Deserialize<'de> for ToolExecutionResult

deserialize

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,

impl From<ToolExecutionResult> for ToolExecutionInterceptOutcome

impl From<ToolExecutionResult> for ToolExecutionInterceptOutcome

from

fn from(result: ToolExecutionResult) -> Self

impl From<Value> for ToolExecutionResult

impl From<Value> for ToolExecutionResult

from

fn from(result: Json) -> Self

impl PartialEq for ToolExecutionResult

impl PartialEq for ToolExecutionResult

eq

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

ne

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

impl Serialize for ToolExecutionResult

impl Serialize for ToolExecutionResult

serialize

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
    __S: Serializer,