pub struct CompactionResult {
pub messages: Vec<Message>,
pub before_tokens: usize,
pub after_tokens: usize,
pub removed_messages: usize,
}Expand description
压缩操作的结果。
Fields§
§messages: Vec<Message>压缩后的消息列表
before_tokens: usize压缩前的 Token 数
after_tokens: usize压缩后的 Token 数
removed_messages: usize被移除的消息数量
Trait Implementations§
Source§impl Clone for CompactionResult
impl Clone for CompactionResult
Source§fn clone(&self) -> CompactionResult
fn clone(&self) -> CompactionResult
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 CompactionResult
impl RefUnwindSafe for CompactionResult
impl Send for CompactionResult
impl Sync for CompactionResult
impl Unpin for CompactionResult
impl UnsafeUnpin for CompactionResult
impl UnwindSafe for CompactionResult
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