#[non_exhaustive]pub struct AgentResultEvent<'a> { /* private fields */ }Expand description
The final event of an invocation, with its result (AgentResultEvent).
Implementations§
Source§impl<'a> AgentResultEvent<'a>
impl<'a> AgentResultEvent<'a>
Sourcepub fn agent(&self) -> &LocalAgent
pub fn agent(&self) -> &LocalAgent
The agent.
Sourcepub fn agent_mut(&mut self) -> &mut LocalAgent
pub fn agent_mut(&mut self) -> &mut LocalAgent
The agent, mutably: hooks may change its messages, system prompt, tools and state.
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<'a> AgentResultEvent<'a>
impl<'a> AgentResultEvent<'a>
Sourcepub fn result(&self) -> &AgentResult
pub fn result(&self) -> &AgentResult
The result.
Trait Implementations§
Source§impl Debug for AgentResultEvent<'_>
impl Debug for AgentResultEvent<'_>
Source§impl From<&AgentResultEvent<'_>> for AgentStreamEvent
impl From<&AgentResultEvent<'_>> for AgentStreamEvent
Source§fn from(event: &AgentResultEvent<'_>) -> Self
fn from(event: &AgentResultEvent<'_>) -> Self
Converts to this type from the input type.
Source§impl HookEvent for AgentResultEvent<'static>
impl HookEvent for AgentResultEvent<'static>
Source§type Event<'a> = AgentResultEvent<'a>
type Event<'a> = AgentResultEvent<'a>
The event type for an agent borrow of lifetime
'a.impl<H> IntoHookImpl<AgentResultEvent<'static>> for Hwhere
H: for<'a> Hook<AgentResultEvent<'a>>,
impl<F, R> IntoSyncHook<AgentResultEvent<'static>> for F
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for AgentResultEvent<'a>
impl<'a> !UnwindSafe for AgentResultEvent<'a>
impl<'a> Freeze for AgentResultEvent<'a>
impl<'a> Send for AgentResultEvent<'a>
impl<'a> Sync for AgentResultEvent<'a>
impl<'a> Unpin for AgentResultEvent<'a>
impl<'a> UnsafeUnpin for AgentResultEvent<'a>
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.