pub struct ContextBudget {
pub context_window_tokens: u64,
pub used_tokens: u64,
pub hard_remaining_tokens: u64,
pub required_next_round_tokens: u64,
}Expand description
Host-supplied, conservative accounting for the next request.
Fields§
§context_window_tokens: u64§used_tokens: u64Current full input footprint, including system/tool/summary overhead.
hard_remaining_tokens: u64Remaining usable capacity according to the host/provider. May be less than window - used; a larger value never enlarges the physical window.
required_next_round_tokens: u64Required headroom for the next round, including output/thinking/tool growth. Compared with (not added to) the configured minimum reserve.
Trait Implementations§
Source§impl Clone for ContextBudget
impl Clone for ContextBudget
impl Copy for ContextBudget
Source§impl Debug for ContextBudget
impl Debug for ContextBudget
impl Eq for ContextBudget
Source§impl PartialEq for ContextBudget
impl PartialEq for ContextBudget
impl StructuralPartialEq for ContextBudget
Auto Trait Implementations§
impl Freeze for ContextBudget
impl RefUnwindSafe for ContextBudget
impl Send for ContextBudget
impl Sync for ContextBudget
impl Unpin for ContextBudget
impl UnsafeUnpin for ContextBudget
impl UnwindSafe for ContextBudget
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.