pub struct ContextItem {
pub id: String,
pub content: String,
pub last_accessed_turn: u64,
pub access_count: u32,
pub tokens: u32,
pub pinned: bool,
}Expand description
A tracked context item with metadata for eviction decisions.
Fields§
§id: StringUnique identifier (e.g., file path or content hash prefix).
content: StringThe content (or a summary of it).
last_accessed_turn: u64Turn number when this item was last accessed.
access_count: u32Number of times this item has been accessed.
tokens: u32Estimated token count.
pinned: boolWhether this item is pinned (protected from eviction).
Trait Implementations§
Source§impl Clone for ContextItem
impl Clone for ContextItem
Source§fn clone(&self) -> ContextItem
fn clone(&self) -> ContextItem
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 ContextItem
impl RefUnwindSafe for ContextItem
impl Send for ContextItem
impl Sync for ContextItem
impl Unpin for ContextItem
impl UnsafeUnpin for ContextItem
impl UnwindSafe for ContextItem
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