pub struct BudgetManager { /* private fields */ }Implementations§
Source§impl BudgetManager
impl BudgetManager
pub fn new( max_tokens: u64, max_neural_replans: u32, max_repair_attempts: u32, max_neural_tokens: u64, ) -> Self
pub fn can_afford(&self, estimate: &CostEstimate) -> bool
pub fn can_afford_neural(&self, estimate: &CostEstimate) -> bool
pub fn record(&mut self, usage: &ResourceUsage)
pub fn can_repair(&self) -> bool
pub fn record_repair(&mut self)
pub fn can_replan(&self) -> bool
pub fn record_replan(&mut self)
Auto Trait Implementations§
impl Freeze for BudgetManager
impl RefUnwindSafe for BudgetManager
impl Send for BudgetManager
impl Sync for BudgetManager
impl Unpin for BudgetManager
impl UnsafeUnpin for BudgetManager
impl UnwindSafe for BudgetManager
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