pub struct PreparedContext {
pub messages: Vec<Message>,
pub token_usage: TokenUsageBreakdown,
pub truncation_occurred: bool,
pub segments_removed: usize,
pub compressed_message_ids: Vec<String>,
pub prompt_cached_tool_outputs: usize,
}Expand description
Result of context preparation with budget enforcement.
Fields§
§messages: Vec<Message>Messages prepared for LLM (may be truncated)
token_usage: TokenUsageBreakdownToken usage breakdown
truncation_occurred: boolWhether truncation occurred
segments_removed: usizeNumber of message segments removed
compressed_message_ids: Vec<String>Message IDs newly archived by this preparation pass.
prompt_cached_tool_outputs: usizeNumber of long tool outputs replaced with prompt-side cached summaries.
Trait Implementations§
Source§impl Clone for PreparedContext
impl Clone for PreparedContext
Source§fn clone(&self) -> PreparedContext
fn clone(&self) -> PreparedContext
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 moreAuto Trait Implementations§
impl Freeze for PreparedContext
impl RefUnwindSafe for PreparedContext
impl Send for PreparedContext
impl Sync for PreparedContext
impl Unpin for PreparedContext
impl UnsafeUnpin for PreparedContext
impl UnwindSafe for PreparedContext
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