pub struct TaskSupervisor { /* private fields */ }Expand description
Opt-in wrapper around execute_task that enforces FSM transitions.
Implementations§
Source§impl TaskSupervisor
impl TaskSupervisor
pub fn new(intent: TaskIntent) -> Self
pub fn state(&self) -> &TaskState
pub fn is_runnable(&self) -> bool
Sourcepub async fn execute<P: PolicyEngine>(
&mut self,
kernel: &LoongKernel<P>,
pack_id: &str,
token: &CapabilityToken,
) -> Result<KernelDispatch, Fault>
pub async fn execute<P: PolicyEngine>( &mut self, kernel: &LoongKernel<P>, pack_id: &str, token: &CapabilityToken, ) -> Result<KernelDispatch, Fault>
Execute the task through the kernel, tracking state transitions.
Auto Trait Implementations§
impl Freeze for TaskSupervisor
impl RefUnwindSafe for TaskSupervisor
impl Send for TaskSupervisor
impl Sync for TaskSupervisor
impl Unpin for TaskSupervisor
impl UnsafeUnpin for TaskSupervisor
impl UnwindSafe for TaskSupervisor
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