pub struct ContextOccupancySnapshot {
pub uncached_input_tokens: Option<u64>,
pub output_tokens: Option<u64>,
pub cache_read_tokens: Option<u64>,
pub cache_write_tokens: Option<u64>,
pub reasoning_tokens: Option<u64>,
pub unattributed_tokens: Option<u64>,
pub used_tokens: u64,
pub context_window: Option<u64>,
pub evidence: ObservationEvidenceV1,
pub provenance: ContextOccupancyProvenance,
}Fields§
§uncached_input_tokens: Option<u64>None when the source reported used_tokens/context_window
alone and never observed how the total decomposes – same
not-observed-not-zero convention reasoning_tokens already
follows here, now shared by every segment ProviderEvent:: UsageUpdated cannot supply.
output_tokens: Option<u64>§cache_read_tokens: Option<u64>§cache_write_tokens: Option<u64>§reasoning_tokens: Option<u64>§unattributed_tokens: Option<u64>§used_tokens: u64§context_window: Option<u64>§evidence: ObservationEvidenceV1§provenance: ContextOccupancyProvenanceImplementations§
Source§impl ContextOccupancySnapshot
impl ContextOccupancySnapshot
pub fn occupied_tokens(self) -> u64
Trait Implementations§
Source§impl Clone for ContextOccupancySnapshot
impl Clone for ContextOccupancySnapshot
impl Copy for ContextOccupancySnapshot
Source§impl Debug for ContextOccupancySnapshot
impl Debug for ContextOccupancySnapshot
Source§impl<'de> Deserialize<'de> for ContextOccupancySnapshot
impl<'de> Deserialize<'de> for ContextOccupancySnapshot
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 ContextOccupancySnapshot
Source§impl PartialEq for ContextOccupancySnapshot
impl PartialEq for ContextOccupancySnapshot
Source§impl Serialize for ContextOccupancySnapshot
impl Serialize for ContextOccupancySnapshot
impl StructuralPartialEq for ContextOccupancySnapshot
Auto Trait Implementations§
impl Freeze for ContextOccupancySnapshot
impl RefUnwindSafe for ContextOccupancySnapshot
impl Send for ContextOccupancySnapshot
impl Sync for ContextOccupancySnapshot
impl Unpin for ContextOccupancySnapshot
impl UnsafeUnpin for ContextOccupancySnapshot
impl UnwindSafe for ContextOccupancySnapshot
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