pub struct ContextSelection {
pub id: String,
pub kind: CompactionContextKind,
pub content_hash: String,
pub decision: CompactionDecision,
pub reason: CompactionSelectionReason,
pub priority: CompactionPriority,
pub required: bool,
pub rank: u64,
pub estimated_tokens: u64,
pub byte_count: u64,
pub source: Option<ContextSource>,
pub memory_status: Option<MemoryStatus>,
}Expand description
One content-addressed, provenance-preserving selection decision.
Fields§
§id: StringStable namespaced identifier, such as evidence:<uuid> or history:<digest>.
kind: CompactionContextKindSemantic context class.
content_hash: StringBLAKE3 digest of the exact public serialized item considered.
decision: CompactionDecisionFinal inclusion decision.
reason: CompactionSelectionReasonRuntime-owned deterministic decision reason.
priority: CompactionPrioritySelection priority.
required: boolWhether omission must fail closed instead of degrading context.
rank: u64Stable total order within the priority class.
estimated_tokens: u64Versioned deterministic fallback token estimate for this item.
byte_count: u64Exact serialized public byte count for this item.
source: Option<ContextSource>Original session/event/evidence/workspace provenance when available.
memory_status: Option<MemoryStatus>Durable lifecycle for memory selections.
Trait Implementations§
Source§impl Clone for ContextSelection
impl Clone for ContextSelection
Source§fn clone(&self) -> ContextSelection
fn clone(&self) -> ContextSelection
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 ContextSelection
impl Debug for ContextSelection
Source§impl<'de> Deserialize<'de> for ContextSelection
impl<'de> Deserialize<'de> for ContextSelection
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
impl Eq for ContextSelection
Source§impl PartialEq for ContextSelection
impl PartialEq for ContextSelection
Source§impl Serialize for ContextSelection
impl Serialize for ContextSelection
impl StructuralPartialEq for ContextSelection
Auto Trait Implementations§
impl Freeze for ContextSelection
impl RefUnwindSafe for ContextSelection
impl Send for ContextSelection
impl Sync for ContextSelection
impl Unpin for ContextSelection
impl UnsafeUnpin for ContextSelection
impl UnwindSafe for ContextSelection
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