pub struct CompactResult {
pub compacted: bool,
pub messages_before: usize,
pub messages_after: usize,
pub turns_compacted: usize,
pub turns_kept: usize,
pub summary_length: usize,
pub error: Option<String>,
}Expand description
Result of a manual compaction operation.
Used by force_compact() to report what happened during compaction.
Fields§
§compacted: boolWhether compaction was actually performed. False if there weren’t enough turns to compact.
messages_before: usizeNumber of messages before compaction.
messages_after: usizeNumber of messages after compaction.
turns_compacted: usizeNumber of turns that were summarized.
turns_kept: usizeNumber of recent turns that were preserved.
summary_length: usizeCharacter length of the generated summary (for LLM compaction).
error: Option<String>Error message if compaction failed.
Trait Implementations§
Source§impl Clone for CompactResult
impl Clone for CompactResult
Source§fn clone(&self) -> CompactResult
fn clone(&self) -> CompactResult
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 CompactResult
impl Debug for CompactResult
Source§impl Default for CompactResult
impl Default for CompactResult
Source§fn default() -> CompactResult
fn default() -> CompactResult
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CompactResult
impl RefUnwindSafe for CompactResult
impl Send for CompactResult
impl Sync for CompactResult
impl Unpin for CompactResult
impl UnwindSafe for CompactResult
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more