pub struct Context { /* private fields */ }Implementations§
Source§impl Context
impl Context
pub fn new(root_node_ids: Vec<String>) -> Result<Self>
pub fn root_node_ids(&self) -> &[String]
pub fn loaded_node_ids(&self) -> &[String]
pub fn fixed_node_ids(&self) -> &[String]
pub fn full_node_ids(&self) -> Vec<&str>
pub fn contains_full_node(&self, id: &str) -> bool
pub fn node(&self, id: &str) -> Option<&Node>
pub fn apply_load( &mut self, requested: Node, fixed: Vec<Node>, ) -> Result<LoadReport>
pub fn refresh(&mut self, nodes: impl IntoIterator<Item = Node>) -> Result<()>
pub fn restore( &mut self, nodes: impl IntoIterator<Item = Node>, directly_loaded: Vec<String>, ) -> Result<()>
Sourcepub fn projection(
&self,
updates: &BTreeMap<String, NodeDraft>,
creates: &[StagedCreate],
) -> Result<Vec<ProjectionItem>>
pub fn projection( &self, updates: &BTreeMap<String, NodeDraft>, creates: &[StagedCreate], ) -> Result<Vec<ProjectionItem>>
Renders the complete current Kweb projection without touching Chatend.
Unlike Self::sync_chatend, this view has no durable representation
history. It emits one current recent-connections section and is intended
for ephemeral consumers such as box-free subagents.
Sourcepub fn sync_chatend(
&self,
journal: &mut HistorySession,
recorded_at: impl Into<String>,
updates: &BTreeMap<String, NodeDraft>,
creates: &[StagedCreate],
) -> Result<Vec<BoxId>>
pub fn sync_chatend( &self, journal: &mut HistorySession, recorded_at: impl Into<String>, updates: &BTreeMap<String, NodeDraft>, creates: &[StagedCreate], ) -> Result<Vec<BoxId>>
Reconcile this context’s complete provider-facing projection through an already-open durable Session History handle.
The returned IDs are the active Kweb boxes whose name or canonical revision changed, in current projection order.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnsafeUnpin for Context
impl UnwindSafe for Context
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