#[non_exhaustive]pub struct ToolResultEvent { /* private fields */ }Expand description
A tool call’s final result is ready (ToolResultEvent).
Implementations§
Source§impl ToolResultEvent
impl ToolResultEvent
Sourcepub fn invocation_state(&self) -> &InvocationState
pub fn invocation_state(&self) -> &InvocationState
The caller’s per-invocation state.
Sourcepub fn invocation_context(&self) -> Option<&InvocationContext>
pub fn invocation_context(&self) -> Option<&InvocationContext>
The request this event belongs to.
Source§impl ToolResultEvent
impl ToolResultEvent
Sourcepub fn result(&self) -> &ToolResultBlock
pub fn result(&self) -> &ToolResultBlock
The result.
Trait Implementations§
Source§impl Debug for ToolResultEvent
impl Debug for ToolResultEvent
Source§impl From<&ToolResultEvent> for ToolResultEventData
impl From<&ToolResultEvent> for ToolResultEventData
Source§fn from(event: &ToolResultEvent) -> Self
fn from(event: &ToolResultEvent) -> Self
Converts to this type from the input type.
Source§impl From<&ToolResultEvent> for AgentStreamEvent
impl From<&ToolResultEvent> for AgentStreamEvent
Source§fn from(event: &ToolResultEvent) -> Self
fn from(event: &ToolResultEvent) -> Self
Converts to this type from the input type.
Source§impl HookEvent for ToolResultEvent
impl HookEvent for ToolResultEvent
Source§type Event<'a> = ToolResultEvent
type Event<'a> = ToolResultEvent
The event type for an agent borrow of lifetime
'a.impl<H> IntoHookImpl<ToolResultEvent> for Hwhere
H: Hook<ToolResultEvent>,
impl<F, R> IntoSyncHook<ToolResultEvent> for F
Auto Trait Implementations§
impl !RefUnwindSafe for ToolResultEvent
impl !UnwindSafe for ToolResultEvent
impl Freeze for ToolResultEvent
impl Send for ToolResultEvent
impl Sync for ToolResultEvent
impl Unpin for ToolResultEvent
impl UnsafeUnpin for ToolResultEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.