pub struct Tcb {
pub id: TaskId,
pub parent: Option<TaskId>,
pub state: TaskLifecycle,
pub budget: BudgetLedger,
pub wait: Option<WaitReason>,
pub caps: Vec<CompactString>,
pub proc: Option<ProcInfo>,
}Expand description
One schedulable entity. The root loop and every sub-agent are uniform Tcbs.
Fields§
§id: TaskId§parent: Option<TaskId>§state: TaskLifecycle§budget: BudgetLedger§wait: Option<WaitReason>§caps: Vec<CompactString>Capability ids permitted to this task (mirrors AgentProcess.permitted_capability_ids).
proc: Option<ProcInfo>Sub-agent identity for child tasks; None for the root loop.
Implementations§
Source§impl Tcb
impl Tcb
Sourcepub fn root(id: impl Into<TaskId>, budget: SchedulerBudget) -> Self
pub fn root(id: impl Into<TaskId>, budget: SchedulerBudget) -> Self
The root loop task. Constructed from the runtime task at Start.
Sourcepub fn spawned(manifest: &IsolationManifest, budget: SchedulerBudget) -> Self
pub fn spawned(manifest: &IsolationManifest, budget: SchedulerBudget) -> Self
A sub-agent task spawned under the root, seeded Running, carrying the manifest’s
process identity. The single source of truth for what the AgentProcess view exposes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Tcb
impl RefUnwindSafe for Tcb
impl Send for Tcb
impl Sync for Tcb
impl Unpin for Tcb
impl UnsafeUnpin for Tcb
impl UnwindSafe for Tcb
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