pub trait CommandCostContext {
// Required methods
fn display_currency(&self) -> CommandCurrency;
fn session_cost_for_currency(&self, currency: CommandCurrency) -> f64;
fn subagent_cost_for_currency(&self, currency: CommandCurrency) -> f64;
fn accrue_cost_estimate(&mut self, amount: f64, currency: CommandCurrency);
fn record_turn_cost(
&mut self,
amount: f64,
currency: CommandCurrency,
route_receipt: bool,
);
}Expand description
Cost display and accounting operations.
Required Methods§
fn display_currency(&self) -> CommandCurrency
fn session_cost_for_currency(&self, currency: CommandCurrency) -> f64
fn subagent_cost_for_currency(&self, currency: CommandCurrency) -> f64
fn accrue_cost_estimate(&mut self, amount: f64, currency: CommandCurrency)
fn record_turn_cost( &mut self, amount: f64, currency: CommandCurrency, route_receipt: bool, )
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".