pub struct TokenTrackingConfig {
pub enabled: bool,
pub emit_events: bool,
pub log_usage: bool,
pub custom_costs: Option<TokenCosts>,
}Expand description
Configuration for token tracking middleware
Fields§
§enabled: boolWhether to track token usage
emit_events: boolWhether to emit token usage events
log_usage: boolWhether to log token usage to console
custom_costs: Option<TokenCosts>Custom cost per token (overrides provider defaults)
Trait Implementations§
Source§impl Clone for TokenTrackingConfig
impl Clone for TokenTrackingConfig
Source§fn clone(&self) -> TokenTrackingConfig
fn clone(&self) -> TokenTrackingConfig
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 TokenTrackingConfig
impl Debug for TokenTrackingConfig
Auto Trait Implementations§
impl Freeze for TokenTrackingConfig
impl RefUnwindSafe for TokenTrackingConfig
impl Send for TokenTrackingConfig
impl Sync for TokenTrackingConfig
impl Unpin for TokenTrackingConfig
impl UnwindSafe for TokenTrackingConfig
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