Trait TaskManager
Source pub trait TaskManager: Send + Sync {
// Required methods
fn start_task<'life0, 'async_trait>(
&'life0 self,
request: TaskLaunchRequest,
ctx: TaskStartContext,
) -> Pin<Box<dyn Future<Output = Result<TaskStartOutcome, TaskManagerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn wait_for_turn<'life0, 'life1, 'async_trait>(
&'life0 self,
turn_id: &'life1 TurnId,
cancellation: Option<TurnCancellation>,
) -> Pin<Box<dyn Future<Output = Result<Option<TurnTaskUpdate>, TaskManagerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn take_pending_loop_updates<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PendingLoopUpdates, TaskManagerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn on_turn_interrupted<'life0, 'life1, 'async_trait>(
&'life0 self,
turn_id: &'life1 TurnId,
) -> Pin<Box<dyn Future<Output = Result<(), TaskManagerError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn handle(&self) -> TaskManagerHandle;
}