pub struct BudgetAllocation {
pub system: usize,
pub critical: usize,
pub primary: usize,
pub supporting: usize,
pub reference: usize,
}Expand description
Divides a total token budget across context zones.
Fields§
§system: usizeSystem zone
critical: usizeCritical zone
primary: usizePrimary zone
supporting: usizeSupporting zone
reference: usizeReference zone
Implementations§
Source§impl BudgetAllocation
impl BudgetAllocation
Sourcepub fn from_total_with_config(total: usize, config: &ZoneBudgetConfig) -> Self
pub fn from_total_with_config(total: usize, config: &ZoneBudgetConfig) -> Self
Allocate a total budget across zones with the given percentages.
Sourcepub fn from_total(total: usize) -> Self
pub fn from_total(total: usize) -> Self
Allocate a total budget across zones with default percentages.
Trait Implementations§
Source§impl Clone for BudgetAllocation
impl Clone for BudgetAllocation
Auto Trait Implementations§
impl Freeze for BudgetAllocation
impl RefUnwindSafe for BudgetAllocation
impl Send for BudgetAllocation
impl Sync for BudgetAllocation
impl Unpin for BudgetAllocation
impl UnsafeUnpin for BudgetAllocation
impl UnwindSafe for BudgetAllocation
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