pub struct CopilotModelUsage {
pub input_tokens: i64,
pub output_tokens: i64,
pub cache_read_tokens: i64,
pub cache_write_tokens: i64,
pub reasoning_tokens: i64,
}Expand description
Token counts captured by Copilot CLI at session shutdown.
Field names mirror the camelCase keys the CLI writes to disk — the
usage_processor normalises these into the Claude-style field names
(input_tokens, cache_read_input_tokens, …) before storing them in
conversation_usage.
Fields§
§input_tokens: i64Input (prompt) tokens.
output_tokens: i64Output (completion) tokens.
cache_read_tokens: i64Tokens served from the prompt cache.
cache_write_tokens: i64Tokens written into the prompt cache.
reasoning_tokens: i64Reasoning tokens billed separately by the model.
Trait Implementations§
Source§impl Clone for CopilotModelUsage
impl Clone for CopilotModelUsage
Source§fn clone(&self) -> CopilotModelUsage
fn clone(&self) -> CopilotModelUsage
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 moreSource§impl Debug for CopilotModelUsage
impl Debug for CopilotModelUsage
Source§impl<'de> Deserialize<'de> for CopilotModelUsage
impl<'de> Deserialize<'de> for CopilotModelUsage
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
Auto Trait Implementations§
impl Freeze for CopilotModelUsage
impl RefUnwindSafe for CopilotModelUsage
impl Send for CopilotModelUsage
impl Sync for CopilotModelUsage
impl Unpin for CopilotModelUsage
impl UnsafeUnpin for CopilotModelUsage
impl UnwindSafe for CopilotModelUsage
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<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>
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 more