pub enum TruncationAction {
NewSegment,
MergeSegments {
summaries: Vec<String>,
start_position: usize,
count: usize,
},
TruncateOnly,
}Expand description
Type of truncation action, determines how the caller should handle the result.
Variants§
NewSegment
Generate a new summary segment from full conversation rounds.
The removed messages in TruncationResult are the full rounds to summarize.
MergeSegments
Merge multiple existing summary segments into one.
summaries contains the text of segments to merge (oldest first).
start_position is the index of the first segment in history.
count is how many consecutive segments to merge.
TruncateOnly
No compression needed — history was truncated but the removed content is too small to justify an LLM summary call.
Trait Implementations§
Source§impl Clone for TruncationAction
impl Clone for TruncationAction
Source§fn clone(&self) -> TruncationAction
fn clone(&self) -> TruncationAction
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 moreSource§impl Debug for TruncationAction
impl Debug for TruncationAction
impl Eq for TruncationAction
Source§impl PartialEq for TruncationAction
impl PartialEq for TruncationAction
impl StructuralPartialEq for TruncationAction
Auto Trait Implementations§
impl Freeze for TruncationAction
impl RefUnwindSafe for TruncationAction
impl Send for TruncationAction
impl Sync for TruncationAction
impl Unpin for TruncationAction
impl UnsafeUnpin for TruncationAction
impl UnwindSafe for TruncationAction
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<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
Compare self to
key and return true if they are equal.