pub enum CompactionKind {
Reminder,
Fallback,
Reset,
}Expand description
What a successful ContextCompaction::compact actually did to the
history. agent-base stays strategy-free: it only relays the kind into
the log line, so a nudge append never reads as a compaction and a real
replacement always does (issue #33).
Variants§
Reminder
One budget nudge appended at the end; prior messages untouched.
Fallback
Last-turn nudge appended; prior messages untouched.
Reset
Messages replaced wholesale (window rotation or compression).
Implementations§
Source§impl CompactionKind
impl CompactionKind
Sourcepub fn trigger_log(self) -> &'static str
pub fn trigger_log(self) -> &'static str
The grep-able log line emitted when the compactor returns this kind. The three strings are deliberately distinct: a Reminder/Fallback append must NOT contain “compaction” (nothing was compacted — one message was appended), while a Reset must (the history was replaced).
Sourcepub fn completion_log(self) -> Option<&'static str>
pub fn completion_log(self) -> Option<&'static str>
The completion log line, emitted after the compactor’s messages are
installed. None for appends — they are atomic, there is nothing to
complete, and a second line would only invite misreading.
Trait Implementations§
Source§impl Clone for CompactionKind
impl Clone for CompactionKind
impl Copy for CompactionKind
Source§impl Debug for CompactionKind
impl Debug for CompactionKind
impl Eq for CompactionKind
Source§impl PartialEq for CompactionKind
impl PartialEq for CompactionKind
impl StructuralPartialEq for CompactionKind
Auto Trait Implementations§
impl Freeze for CompactionKind
impl RefUnwindSafe for CompactionKind
impl Send for CompactionKind
impl Sync for CompactionKind
impl Unpin for CompactionKind
impl UnsafeUnpin for CompactionKind
impl UnwindSafe for CompactionKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.