pub struct ContextItem {
pub id: String,
pub role: String,
pub content: String,
pub token_count: usize,
pub priority: u8,
pub pinned: bool,
pub created_at: f64,
}Expand description
A discreet unit of context presented to the synthesis engine.
Fields§
§id: StringUnique identifier for this context entry.
role: StringLogical role (for example: system, user, assistant, context).
content: StringRaw textual content.
token_count: usizeMeasured token count (computed dynamically if initialized as 0).
priority: u8Retention priority. Lower values indicate higher importance. Priority 0 is pinned.
pinned: boolIf true, this item will never be pruned regardless of budget pressure.
created_at: f64Timestamp (UNIX epoch in seconds or fractional seconds) for FIFO ordering.
Implementations§
Trait Implementations§
Source§impl Clone for ContextItem
impl Clone for ContextItem
Source§impl Debug for ContextItem
impl Debug for ContextItem
Source§impl PartialEq for ContextItem
impl PartialEq for ContextItem
impl StructuralPartialEq for ContextItem
Auto 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