pub struct CompactionReport {
pub dropped_count: usize,
pub tokens_before: usize,
pub tokens_after: usize,
pub overflow: bool,
pub dropped_messages: Vec<LlmMessage>,
}Expand description
Result of a context transformation pass.
Fields§
§dropped_count: usizeNumber of messages that were removed during compaction.
tokens_before: usizeEstimated tokens before compaction.
tokens_after: usizeEstimated tokens after compaction.
overflow: boolWhether compaction was triggered by overflow.
dropped_messages: Vec<LlmMessage>The LLM messages that were dropped during this compaction pass.
Only LlmMessage variants are included; CustomMessage values are
filtered out. Populated by the sliding-window compaction routine; empty for
bare-closure transformers that don’t have access to the dropped slice.
Trait Implementations§
Source§impl Clone for CompactionReport
impl Clone for CompactionReport
Source§fn clone(&self) -> CompactionReport
fn clone(&self) -> CompactionReport
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 CompactionReport
impl Debug for CompactionReport
Source§impl<'de> Deserialize<'de> for CompactionReport
impl<'de> Deserialize<'de> for CompactionReport
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CompactionReport
impl RefUnwindSafe for CompactionReport
impl Send for CompactionReport
impl Sync for CompactionReport
impl Unpin for CompactionReport
impl UnsafeUnpin for CompactionReport
impl UnwindSafe for CompactionReport
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