pub struct ContextUsage {
pub estimated_tokens: usize,
pub max_tokens: usize,
pub reserved_response_tokens: usize,
pub available_tokens: usize,
pub utilization: f32,
pub over_limit: bool,
}Expand description
Estimated context usage for a session.
Fields§
§estimated_tokens: usizeEstimated number of tokens consumed by the transcript.
max_tokens: usizeMaximum tokens configured for the session.
reserved_response_tokens: usizeTokens reserved for the next response.
available_tokens: usizeEstimated tokens available for prompts before hitting the limit.
utilization: f32Estimated utilization ratio (0.0 - 1.0+).
over_limit: boolWhether the estimate exceeds the available budget.
Trait Implementations§
Source§impl Clone for ContextUsage
impl Clone for ContextUsage
Source§fn clone(&self) -> ContextUsage
fn clone(&self) -> ContextUsage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContextUsage
impl Debug for ContextUsage
impl Copy for ContextUsage
Auto Trait Implementations§
impl Freeze for ContextUsage
impl RefUnwindSafe for ContextUsage
impl Send for ContextUsage
impl Sync for ContextUsage
impl Unpin for ContextUsage
impl UnwindSafe for ContextUsage
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