pub struct Usage {
pub input_tokens: u32,
pub output_tokens: u32,
pub total_tokens: u32,
pub retries: u32,
pub cost: Option<f64>,
}Expand description
Token usage and cost information from an extraction request.
Fields§
§input_tokens: u32Number of input (prompt) tokens consumed.
output_tokens: u32Number of output (completion) tokens consumed.
total_tokens: u32Total tokens (input + output) across all attempts.
retries: u32Number of retry attempts due to parse/validation failures.
cost: Option<f64>Estimated cost in USD (requires cost-tracking feature).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Usage
impl RefUnwindSafe for Usage
impl Send for Usage
impl Sync for Usage
impl Unpin for Usage
impl UnsafeUnpin for Usage
impl UnwindSafe for Usage
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