pub struct ChatOutcome {Show 16 fields
pub text: String,
pub reasoning: String,
pub tool_calls: Vec<ToolCall>,
pub finish_reason: Option<String>,
pub ttft_ms: Option<f64>,
pub tpot_ms: Option<f64>,
pub e2e_ms: f64,
pub arrival_gaps: GapSample,
pub completion_tokens: usize,
pub prompt_tokens: usize,
pub cached_prompt_tokens: usize,
pub server_ttft_ms: Option<f64>,
pub server_tps: Option<f64>,
pub accepted_prediction_tokens: Option<usize>,
pub server_decode_time_ms: Option<f64>,
pub server_total_time_ms: Option<f64>,
}Expand description
2026-09-26: Everything one request produced, plus its timings.
Fields§
§text: String§reasoning: String2026-09-26: The streamed reasoning_content, kept apart from text.
Each non-empty reasoning delta still counts toward completion_tokens
and can start the TTFT clock.
tool_calls: Vec<ToolCall>§finish_reason: Option<String>§ttft_ms: Option<f64>2026-09-26: Client clock: request write → first chunk that carried a reasoning, content or tool-call delta.
tpot_ms: Option<f64>2026-09-26: Client-clock inter-token latency, called TPOT here: first
token-carrying chunk → end of stream ([DONE] or EOF), over
completion_tokens − 1 (itl_ms). The window ends at the final
chunk, not the last token. None below two tokens.
e2e_ms: f642026-09-26: Client clock: request write → end of stream, the same end
instant as tpot_ms.
arrival_gaps: GapSample2026-09-26: Gaps between socket reads that carried a token (gaps).
completion_tokens: usize2026-09-26: One per token-carrying reasoning or content delta; a
usage.completion_tokens replaces the running count, and later deltas
add to it.
prompt_tokens: usize§cached_prompt_tokens: usize§server_ttft_ms: Option<f64>2026-09-26: usage.time_to_first_token_ms, on the server’s clock.
server_tps: Option<f64>2026-09-26: usage."response_token/s", which this engine’s server
computes as (completion_tokens − 1) / decode seconds
(ir::Usage::decode_rate_tok_s in the server crate).
accepted_prediction_tokens: Option<usize>2026-09-26: Accepted speculative draft tokens
(usage.completion_tokens_details.accepted_prediction_tokens). None
when the field is absent, so it differs from Some(0).
server_decode_time_ms: Option<f64>2026-09-26: usage.decode_time_ms, the numerator of
Self::server_tpot_ms. None when absent.
server_total_time_ms: Option<f64>2026-09-26: usage.total_time_ms. None when absent.
Implementations§
Source§impl ChatOutcome
impl ChatOutcome
Sourcepub fn server_tpot_ms(&self) -> Option<f64>
pub fn server_tpot_ms(&self) -> Option<f64>
2026-09-26: Server-clock inter-token latency: decode_time_ms / (completion_tokens − 1), the same itl_ms rule as
Self::tpot_ms. None without the window or below two tokens.
Trait Implementations§
Source§impl Clone for ChatOutcome
impl Clone for ChatOutcome
Source§fn clone(&self) -> ChatOutcome
fn clone(&self) -> ChatOutcome
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ChatOutcome
impl Debug for ChatOutcome
Source§impl Default for ChatOutcome
impl Default for ChatOutcome
Source§fn default() -> ChatOutcome
fn default() -> ChatOutcome
Source§impl From<&ChatOutcome> for Transcript
impl From<&ChatOutcome> for Transcript
Source§fn from(o: &ChatOutcome) -> Self
fn from(o: &ChatOutcome) -> Self
Auto Trait Implementations§
impl Freeze for ChatOutcome
impl RefUnwindSafe for ChatOutcome
impl Send for ChatOutcome
impl Sync for ChatOutcome
impl Unpin for ChatOutcome
impl UnwindSafe for ChatOutcome
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more