pub struct ProviderUsageSnapshot {
pub input_tokens: Option<u64>,
pub output_tokens: Option<u64>,
pub total_tokens: Option<u64>,
pub reasoning_tokens: Option<u64>,
pub cache_creation_input_tokens: Option<u64>,
pub cache_read_input_tokens: Option<u64>,
pub cache_write_input_tokens: Option<u64>,
}Expand description
Raw authoritative usage fields preserved from provider terminal events.
Each field remains optional so callers can distinguish an explicit
provider-reported zero from an omitted value. Flat counters on
StreamHandlingOutput remain the normalized compatibility view.
Fields§
§input_tokens: Option<u64>§output_tokens: Option<u64>§total_tokens: Option<u64>§reasoning_tokens: Option<u64>§cache_creation_input_tokens: Option<u64>§cache_read_input_tokens: Option<u64>§cache_write_input_tokens: Option<u64>OpenAI Responses cache-write volume. This is raw provider metadata and is not folded into the disjoint legacy prompt-cache counters.
Trait Implementations§
Source§impl Clone for ProviderUsageSnapshot
impl Clone for ProviderUsageSnapshot
Source§fn clone(&self) -> ProviderUsageSnapshot
fn clone(&self) -> ProviderUsageSnapshot
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 ProviderUsageSnapshot
Source§impl Debug for ProviderUsageSnapshot
impl Debug for ProviderUsageSnapshot
Source§impl Default for ProviderUsageSnapshot
impl Default for ProviderUsageSnapshot
Source§fn default() -> ProviderUsageSnapshot
fn default() -> ProviderUsageSnapshot
Returns the “default value” for a type. Read more
impl Eq for ProviderUsageSnapshot
Source§impl PartialEq for ProviderUsageSnapshot
impl PartialEq for ProviderUsageSnapshot
impl StructuralPartialEq for ProviderUsageSnapshot
Auto Trait Implementations§
impl Freeze for ProviderUsageSnapshot
impl RefUnwindSafe for ProviderUsageSnapshot
impl Send for ProviderUsageSnapshot
impl Sync for ProviderUsageSnapshot
impl Unpin for ProviderUsageSnapshot
impl UnsafeUnpin for ProviderUsageSnapshot
impl UnwindSafe for ProviderUsageSnapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.