pub struct SpendNode { /* private fields */ }Expand description
What one turn, goal, task or session has spent and the engine’s ceiling on it, with the node above it that it spends into as well.
A turn’s own calls, those made on its side (compaction, memory, web extraction) and those of the delegates it started all spend into its node: a delegate’s turn sits under the turn that started it, and keeps spending into it after that turn has ended. A root turn sits under its goal, for a goal round, and its session.
Implementations§
Source§impl SpendNode
impl SpendNode
pub fn session(limit: Option<u64>) -> Self
pub fn goal(limit: Option<u64>, session: Arc<SpendNode>) -> Self
Sourcepub fn task(limit: Option<u64>, session: Arc<SpendNode>) -> Self
pub fn task(limit: Option<u64>, session: Arc<SpendNode>) -> Self
A host sub-agent’s own ceiling. Never under a turn: a turn’s
delegated counts only through the turns directly under it.
Sourcepub fn turn(limit: Option<u64>, above: Option<Arc<SpendNode>>) -> Self
pub fn turn(limit: Option<u64>, above: Option<Arc<SpendNode>>) -> Self
A root turn under its goal or session, or a delegate’s under the turn that started it.
Sourcepub fn counting_into(self, session: Arc<SpendNode>) -> Self
pub fn counting_into(self, session: Arc<SpendNode>) -> Self
A delegate turn that also counts into session, its own.
pub fn scope(&self) -> Scope
pub fn limit(&self) -> Option<u64>
pub fn set_limit(&self, limit: Option<u64>)
Sourcepub fn delegated(&self) -> Spend
pub fn delegated(&self) -> Spend
The part of a turn’s Self::read its delegates spent.
Sourcepub fn restore(&self, spent: Spend)
pub fn restore(&self, spent: Spend)
Start from what the session log recorded, before anything spends.
Sourcepub fn whole_turn(&self) -> Spend
pub fn whole_turn(&self) -> Spend
The root turn and every delegate under it; for a node that is not a turn, its own reading.
Sourcepub fn find(&self, scope: Scope) -> Option<&SpendNode>
pub fn find(&self, scope: Scope) -> Option<&SpendNode>
The nearest node up the chain, this one included, that is scope’s.