pub struct TurnResult {
pub reply: String,
pub message_id: String,
pub invoked_knowledge_search: bool,
pub citations: Vec<Citation>,
pub usage: Option<TurnUsage>,
pub next_step_id: Option<String>,
}Expand description
The terminal outcome of a streamed turn.
Fields§
§reply: StringThe agent’s final natural-language reply.
message_id: StringThe id of the persisted outbound (agent) message, for eventual_response.
invoked_knowledge_search: boolTrue if any knowledge_search tool call ran this turn (diagnostics).
citations: Vec<Citation>The sources that grounded this turn (the auto-injected context + every
knowledge_search result), deduped by id and capped. Carried onto the
eventual_response’s citations. Empty when nothing was retrieved.
usage: Option<TurnUsage>The turn’s token-accounting + cost, captured from the engine’s terminal
AgentEvent::Completed. Carried onto the eventual_response’s usage
object so clients accumulate live session cost. None when the engine
reported no Completed event (e.g. an offline mock turn).
next_step_id: Option<String>The conversation-workflow step id after this turn’s judge ran. Some
only when the turn had a WorkflowTurn; the caller persists it onto the
session so the next turn resumes on the right step. Equals the incoming
step when the judge did not advance (criteria not met, terminal step, or a
judge failure — never freezes, never crashes the turn).
Auto Trait Implementations§
impl Freeze for TurnResult
impl RefUnwindSafe for TurnResult
impl Send for TurnResult
impl Sync for TurnResult
impl Unpin for TurnResult
impl UnsafeUnpin for TurnResult
impl UnwindSafe for TurnResult
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request