pub struct CompressionPlan {Show 26 fields
pub kind: CompressionEventKind,
pub logical_pass_id: Option<String>,
pub fixed_prompt_tokens: u32,
pub compressed_message_ids: Vec<String>,
pub messages_to_summarize: Vec<Message>,
pub summary_tokens: u32,
pub summary_content: String,
pub active_usage_before_percent: f64,
pub active_usage_after_percent: f64,
pub trigger_percent: u8,
pub target_percent: u8,
pub segments_removed: usize,
pub trigger_type: CompressionTriggerType,
pub compression_ratio: f64,
pub model_used: Option<String>,
pub latency_ms: u64,
pub source_tokens: u32,
pub represented_source_tokens: u32,
pub target_summary_tokens: u32,
pub actual_summary_content_tokens: u32,
pub summary_target_ratio: f64,
pub summary_budget_clamped: bool,
pub summary_budget_clamp_reason: Option<String>,
pub summarization_map_calls: u32,
pub summarization_reduce_calls: u32,
pub summarization_fallback_used: bool,
}Expand description
A concrete archive selection and replacement summary. Message-summary archives may include tools that are deliberately excluded from its source.
Fields§
§kind: CompressionEventKind§logical_pass_id: Option<String>Stable identifier for all requests and the persisted event belonging to one logical compression pass.
fixed_prompt_tokens: u32Tokens from active prompt blocks rendered outside Session.messages.
compressed_message_ids: Vec<String>§messages_to_summarize: Vec<Message>Exact summary input; MessageSummary contains only sanitized prose.
summary_tokens: u32§summary_content: String§active_usage_before_percent: f64§active_usage_after_percent: f64§trigger_percent: u8§target_percent: u8§segments_removed: usize§trigger_type: CompressionTriggerType§compression_ratio: f64§model_used: Option<String>§latency_ms: u64§source_tokens: u32Tokens represented by summary input; MessageSummary excludes discarded tools.
represented_source_tokens: u32§target_summary_tokens: u32§actual_summary_content_tokens: u32§summary_target_ratio: f64§summary_budget_clamped: bool§summary_budget_clamp_reason: Option<String>§summarization_map_calls: u32§summarization_reduce_calls: u32§summarization_fallback_used: boolTrait Implementations§
Source§impl Clone for CompressionPlan
impl Clone for CompressionPlan
Source§fn clone(&self) -> CompressionPlan
fn clone(&self) -> CompressionPlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CompressionPlan
impl RefUnwindSafe for CompressionPlan
impl Send for CompressionPlan
impl Sync for CompressionPlan
impl Unpin for CompressionPlan
impl UnsafeUnpin for CompressionPlan
impl UnwindSafe for CompressionPlan
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