pub struct RegionEntry {
pub content: EntryContent,
pub tokens: usize,
pub timestamp: i64,
pub metadata: Option<Value>,
pub kind: EntryKind,
pub key: Option<String>,
pub reasoning: Option<String>,
}Expand description
A single entry within a region.
Each entry has content and metadata tracking its token usage.
Fields§
§content: EntryContentThe entry’s typed parts, and the text they read as. A plain string
still lands here as one text/plain part; see EntryContent.
tokens: usizeToken count for this entry
timestamp: i64Timestamp when this entry was added
metadata: Option<Value>Optional metadata about this entry
kind: EntryKindThe kind of content stored in this entry.
Defaults to EntryKind::Text for backward compatibility with
serialized data that predates the typed-entry system.
key: Option<String>Optional key for HashMap regions. When set, upsert semantics apply.
reasoning: Option<String>An opaque provider token that has to be replayed with this turn.
A stateless backend keeps no server-side thread, so the model’s chain of
thought only survives into the next turn if the client hands the same
sealed blob back. The ChatGPT Codex endpoint is one such backend: it
requires store: false and returns a reasoning item whose
encrypted_content must be replayed verbatim.
It lives on the entry rather than inside EntryKind::AssistantTurn
because the cardinality is per turn, not per call: a turn with two tool
calls still has one reasoning item, and a turn with none still has one.
SerializedToolCall::thought_signature is the same idea at the other
cardinality, and the two do not substitute for each other.
Never serialized onto a request by a provider that did not ask for it. One provider’s opaque token in shared history is replayed to whichever provider runs the next stage, and an unknown key is a hard rejection.
Implementations§
Source§impl RegionEntry
impl RegionEntry
Sourcepub fn as_checklist_item(&self) -> Option<ChecklistItem>
pub fn as_checklist_item(&self) -> Option<ChecklistItem>
Read this entry as a checklist item, when it is one.