pub struct ContextPage {
pub page_id: String,
pub kind: String,
pub source_hashes: Vec<String>,
pub dependency: StateDependency,
pub bytes: u64,
pub tokens: u64,
pub obligations: Vec<String>,
pub freshness_turn: u64,
pub depends_on: Vec<String>,
}Expand description
One immutable, content-addressed context page.
Fields§
§page_id: StringContent address of the page bytes.
kind: StringPage kind (task contract, tool pair, synopsis, source excerpt, …).
source_hashes: Vec<String>Hashes of the exact sources a summary names; empty for exact pages.
dependency: StateDependency§bytes: u64§tokens: u64Token cost under the route’s named accountant.
obligations: Vec<String>Typed obligation labels this page covers. Labels derive from typed task/path/symbol/diagnostic/test/capability/provenance fields — never from model prose.
freshness_turn: u64The turn this page was last referenced (working-set recency).
depends_on: Vec<String>Pages this page requires resident with it (e.g. a tool call and its result form one atomic pair).
Implementations§
Source§impl ContextPage
impl ContextPage
Sourcepub fn dependency_holds(&self, env: &DependencyEnv) -> bool
pub fn dependency_holds(&self, env: &DependencyEnv) -> bool
Whether this page’s declared dependency still holds.
Trait Implementations§
Source§impl Clone for ContextPage
impl Clone for ContextPage
Source§fn clone(&self) -> ContextPage
fn clone(&self) -> ContextPage
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 ContextPage
impl Debug for ContextPage
Source§impl<'de> Deserialize<'de> for ContextPage
impl<'de> Deserialize<'de> for ContextPage
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 ContextPage
impl PartialEq for ContextPage
Source§fn eq(&self, other: &ContextPage) -> bool
fn eq(&self, other: &ContextPage) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ContextPage
impl Serialize for ContextPage
impl StructuralPartialEq for ContextPage
Auto Trait Implementations§
impl Freeze for ContextPage
impl RefUnwindSafe for ContextPage
impl Send for ContextPage
impl Sync for ContextPage
impl Unpin for ContextPage
impl UnsafeUnpin for ContextPage
impl UnwindSafe for ContextPage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.