pub struct BudgetDef {
pub max_cost: Option<f64>,
pub max_tokens: Option<u64>,
pub max_calls: Option<u64>,
pub enforcement: Option<BudgetEnforcement>,
}Expand description
A budget definition with limits and enforcement mode.
Fields§
§max_cost: Option<f64>Maximum cost in USD.
max_tokens: Option<u64>Maximum total tokens (input + output).
max_calls: Option<u64>Maximum number of calls (LLM, MCP, agent combined).
enforcement: Option<BudgetEnforcement>Enforcement mode: hard (abort) or soft (warn and continue).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BudgetDef
impl<'de> Deserialize<'de> for BudgetDef
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 BudgetDef
impl RefUnwindSafe for BudgetDef
impl Send for BudgetDef
impl Sync for BudgetDef
impl Unpin for BudgetDef
impl UnsafeUnpin for BudgetDef
impl UnwindSafe for BudgetDef
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