#[non_exhaustive]pub struct UsageDimensions {
pub input_tokens: u64,
pub output_tokens: u64,
pub wall_ms: Option<u64>,
pub custom: BTreeMap<String, u64>,
}Expand description
Usage report for report_usage. Mirrors today’s
ff_report_usage_and_check ARGV: token-counts, wall-time, custom
dimensions.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.input_tokens: u64Input tokens consumed (LLM-shaped usage). 0 if not applicable.
output_tokens: u64Output tokens produced (LLM-shaped usage).
wall_ms: Option<u64>Wall-clock duration, in milliseconds, attributable to this
report. None for pure token-count reports.
custom: BTreeMap<String, u64>Arbitrary caller-defined dimensions. Use BTreeMap for stable
iteration order (important for dedup-key derivation on some
budget schemes).
Trait Implementations§
Source§impl Clone for UsageDimensions
impl Clone for UsageDimensions
Source§fn clone(&self) -> UsageDimensions
fn clone(&self) -> UsageDimensions
Returns a duplicate of the value. Read more
1.0.0 · 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 UsageDimensions
impl Debug for UsageDimensions
Source§impl Default for UsageDimensions
impl Default for UsageDimensions
Source§fn default() -> UsageDimensions
fn default() -> UsageDimensions
Returns the “default value” for a type. Read more
Source§impl PartialEq for UsageDimensions
impl PartialEq for UsageDimensions
impl Eq for UsageDimensions
impl StructuralPartialEq for UsageDimensions
Auto Trait Implementations§
impl Freeze for UsageDimensions
impl RefUnwindSafe for UsageDimensions
impl Send for UsageDimensions
impl Sync for UsageDimensions
impl Unpin for UsageDimensions
impl UnsafeUnpin for UsageDimensions
impl UnwindSafe for UsageDimensions
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