pub struct EventMetrics {
pub prompt_tokens: Option<u64>,
pub completion_tokens: Option<u64>,
pub cached_tokens: Option<u64>,
pub pruned_tokens: Option<u64>,
pub pruning_ratio_millis: Option<u64>,
}Expand description
Token metrics mirroring ATIF’s prompt/completion/cached fields (Module C
mandates the mirror for downstream compatibility).
Fields§
§prompt_tokens: Option<u64>Prompt tokens (approximate unless provider-reported).
completion_tokens: Option<u64>Completion tokens.
cached_tokens: Option<u64>Provider-cached tokens.
pruned_tokens: Option<u64>Tokens pruned by compression (Module C emission).
pruning_ratio_millis: Option<u64>Compression ratio ×1000 (integer to stay JCS-exact; 350 = 35.0 %).
Trait Implementations§
Source§impl Clone for EventMetrics
impl Clone for EventMetrics
Source§fn clone(&self) -> EventMetrics
fn clone(&self) -> EventMetrics
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 EventMetrics
impl Debug for EventMetrics
Source§impl Default for EventMetrics
impl Default for EventMetrics
Source§fn default() -> EventMetrics
fn default() -> EventMetrics
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EventMetrics
impl<'de> Deserialize<'de> for EventMetrics
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
Source§impl PartialEq for EventMetrics
impl PartialEq for EventMetrics
Source§fn eq(&self, other: &EventMetrics) -> bool
fn eq(&self, other: &EventMetrics) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EventMetrics
impl Serialize for EventMetrics
impl Copy for EventMetrics
impl Eq for EventMetrics
impl StructuralPartialEq for EventMetrics
Auto Trait Implementations§
impl Freeze for EventMetrics
impl RefUnwindSafe for EventMetrics
impl Send for EventMetrics
impl Sync for EventMetrics
impl Unpin for EventMetrics
impl UnsafeUnpin for EventMetrics
impl UnwindSafe for EventMetrics
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.