pub struct UsageCounts {
pub input_tokens: Option<u64>,
pub output_tokens: Option<u64>,
pub cache_creation_tokens: Option<u64>,
pub cache_read_tokens: Option<u64>,
pub reasoning_tokens: Option<u64>,
pub total_tokens: Option<u64>,
pub requests: Option<u64>,
pub local_prompt_eval_tokens: Option<u64>,
pub local_eval_tokens: Option<u64>,
}Fields§
§input_tokens: Option<u64>§output_tokens: Option<u64>§cache_creation_tokens: Option<u64>§cache_read_tokens: Option<u64>§reasoning_tokens: Option<u64>§total_tokens: Option<u64>§requests: Option<u64>§local_prompt_eval_tokens: Option<u64>§local_eval_tokens: Option<u64>Implementations§
Source§impl UsageCounts
impl UsageCounts
pub fn computed_total(&self) -> u64
Trait Implementations§
Source§impl Clone for UsageCounts
impl Clone for UsageCounts
Source§fn clone(&self) -> UsageCounts
fn clone(&self) -> UsageCounts
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 UsageCounts
impl Debug for UsageCounts
Source§impl Default for UsageCounts
impl Default for UsageCounts
Source§fn default() -> UsageCounts
fn default() -> UsageCounts
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for UsageCounts
impl<'de> Deserialize<'de> for UsageCounts
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 UsageCounts
Source§impl JsonSchema for UsageCounts
impl JsonSchema for UsageCounts
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
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 is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for UsageCounts
impl PartialEq for UsageCounts
Source§fn eq(&self, other: &UsageCounts) -> bool
fn eq(&self, other: &UsageCounts) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for UsageCounts
impl Serialize for UsageCounts
impl StructuralPartialEq for UsageCounts
Auto Trait Implementations§
impl Freeze for UsageCounts
impl RefUnwindSafe for UsageCounts
impl Send for UsageCounts
impl Sync for UsageCounts
impl Unpin for UsageCounts
impl UnsafeUnpin for UsageCounts
impl UnwindSafe for UsageCounts
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