pub struct KnowledgeSlotState {
pub key: Option<String>,
pub role: String,
pub body: StoredMessageBody,
pub tokens: u32,
pub pinned: bool,
pub evict_at_boundary: bool,
pub tool_calls: Vec<LogicalToolCall>,
pub pending: Option<Box<StoredMessageState>>,
pub use_count: u64,
pub last_used_step: Option<u64>,
}Expand description
One knowledge slot, body included.
A knowledge entry has identity (its key) and its own lifecycle flags, so it is not a positional
StoredMessageState — but it renders into the prompt all the same, which is why Task 16 gave it
the same body projection. Without it, a restore rebuilt the shape of the knowledge partition
and none of its content.
Fields§
§key: Option<String>None = an unkeyed append; keyed entries upsert.
role: String§body: StoredMessageBody§tokens: u32§pinned: bool§evict_at_boundary: bool§tool_calls: Vec<LogicalToolCall>§pending: Option<Box<StoredMessageState>>The replacement staged for the next cache-generation boundary.
use_count: u64§last_used_step: Option<u64>Trait Implementations§
Source§impl Clone for KnowledgeSlotState
impl Clone for KnowledgeSlotState
Source§fn clone(&self) -> KnowledgeSlotState
fn clone(&self) -> KnowledgeSlotState
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 KnowledgeSlotState
impl Debug for KnowledgeSlotState
Source§impl<'de> Deserialize<'de> for KnowledgeSlotState
impl<'de> Deserialize<'de> for KnowledgeSlotState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for KnowledgeSlotState
impl PartialEq for KnowledgeSlotState
Source§impl Serialize for KnowledgeSlotState
impl Serialize for KnowledgeSlotState
impl StructuralPartialEq for KnowledgeSlotState
Auto Trait Implementations§
impl Freeze for KnowledgeSlotState
impl RefUnwindSafe for KnowledgeSlotState
impl Send for KnowledgeSlotState
impl Sync for KnowledgeSlotState
impl Unpin for KnowledgeSlotState
impl UnsafeUnpin for KnowledgeSlotState
impl UnwindSafe for KnowledgeSlotState
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