pub struct BudgetPolicy {
pub hard_cap: usize,
pub warn_at_pct: f64,
pub trim_at_pct: f64,
}Fields§
§hard_cap: usize§warn_at_pct: f64§trim_at_pct: f64Implementations§
Source§impl BudgetPolicy
impl BudgetPolicy
pub fn default_policy() -> Self
pub fn evaluate( &self, budget: &SignalBudget, incoming_tokens: usize, ) -> PolicyAction
Auto Trait Implementations§
impl Freeze for BudgetPolicy
impl RefUnwindSafe for BudgetPolicy
impl Send for BudgetPolicy
impl Sync for BudgetPolicy
impl Unpin for BudgetPolicy
impl UnsafeUnpin for BudgetPolicy
impl UnwindSafe for BudgetPolicy
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