pub struct TokenBreakdown {
pub system_prompt_tokens: u64,
pub tool_schema_tokens: u64,
pub instruction_file_tokens: u64,
pub message_history_tokens: u64,
pub cache_read_tokens: u64,
pub cache_write_tokens: u64,
pub cache_miss_tokens: u64,
pub subagent_bootstrap_tokens: Option<u64>,
}Expand description
Per-request token-budget breakdown for the assembled first-request prefix.
Fields§
§system_prompt_tokens: u64System prompt text tokens.
tool_schema_tokens: u64On-wire tool schema tokens.
instruction_file_tokens: u64Instruction file tokens included in the prompt.
message_history_tokens: u64Message history text tokens.
cache_read_tokens: u64Cache read tokens (served from prior turns).
cache_write_tokens: u64Cache write tokens (new cache entries created this turn).
cache_miss_tokens: u64Tokens that missed cache (neither read nor written).
subagent_bootstrap_tokens: Option<u64>Subagent bootstrap tokens, if this turn spawned a child agent.
Trait Implementations§
Source§impl Clone for TokenBreakdown
impl Clone for TokenBreakdown
Source§fn clone(&self) -> TokenBreakdown
fn clone(&self) -> TokenBreakdown
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TokenBreakdown
Source§impl Debug for TokenBreakdown
impl Debug for TokenBreakdown
Source§impl Default for TokenBreakdown
impl Default for TokenBreakdown
Source§fn default() -> TokenBreakdown
fn default() -> TokenBreakdown
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TokenBreakdown
impl<'de> Deserialize<'de> for TokenBreakdown
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TokenBreakdown
Source§impl JsonSchema for TokenBreakdown
impl JsonSchema for TokenBreakdown
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for TokenBreakdown
impl PartialEq for TokenBreakdown
Source§impl Serialize for TokenBreakdown
impl Serialize for TokenBreakdown
impl StructuralPartialEq for TokenBreakdown
Auto Trait Implementations§
impl Freeze for TokenBreakdown
impl RefUnwindSafe for TokenBreakdown
impl Send for TokenBreakdown
impl Sync for TokenBreakdown
impl Unpin for TokenBreakdown
impl UnsafeUnpin for TokenBreakdown
impl UnwindSafe for TokenBreakdown
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.