pub struct BudgetConfig {
pub daily_cost_limit_usd: Option<f64>,
pub monthly_cost_limit_usd: Option<f64>,
pub eco_mode_threshold_percent: u8,
}Expand description
Budget limits and eco mode configuration.
When budget limits are set, fighters automatically enter “eco mode” as spending approaches the configured thresholds. Eco mode degrades to: cheap model tier only, no post-bout reflection, minimal tool loading.
Fields§
§daily_cost_limit_usd: Option<f64>Maximum daily cost in USD. When approached, eco mode activates.
monthly_cost_limit_usd: Option<f64>Maximum monthly cost in USD (30-day rolling window).
eco_mode_threshold_percent: u8Percentage of any limit at which eco mode activates (default: 80). At 100% the fighter is fully blocked.
Implementations§
Source§impl BudgetConfig
impl BudgetConfig
Sourcepub fn has_any_limit(&self) -> bool
pub fn has_any_limit(&self) -> bool
Returns true if any budget limit is configured.
Trait Implementations§
Source§impl Clone for BudgetConfig
impl Clone for BudgetConfig
Source§fn clone(&self) -> BudgetConfig
fn clone(&self) -> BudgetConfig
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 BudgetConfig
impl Debug for BudgetConfig
Source§impl Default for BudgetConfig
impl Default for BudgetConfig
Source§impl<'de> Deserialize<'de> for BudgetConfig
impl<'de> Deserialize<'de> for BudgetConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BudgetConfig
impl RefUnwindSafe for BudgetConfig
impl Send for BudgetConfig
impl Sync for BudgetConfig
impl Unpin for BudgetConfig
impl UnsafeUnpin for BudgetConfig
impl UnwindSafe for BudgetConfig
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