Skip to main content

CommandCostContext

Trait CommandCostContext 

Source
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§

Source

fn display_currency(&self) -> CommandCurrency

Source

fn session_cost_for_currency(&self, currency: CommandCurrency) -> f64

Source

fn subagent_cost_for_currency(&self, currency: CommandCurrency) -> f64

Source

fn accrue_cost_estimate(&mut self, amount: f64, currency: CommandCurrency)

Source

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".

Implementors§