pub struct TaskStore { /* private fields */ }Implementations§
Source§impl TaskStore
impl TaskStore
pub fn new(threads: Arc<dyn ThreadStore>) -> Self
pub fn thread_id_for(task_id: &str) -> String
pub fn alloc_task_id() -> TaskId
pub async fn create_task( &self, spec: NewTaskSpec, ) -> Result<TaskState, TaskStoreError>
pub async fn load_task( &self, task_id: &str, ) -> Result<Option<TaskState>, TaskStoreError>
pub async fn load_task_for_owner( &self, owner_thread_id: &str, task_id: &str, ) -> Result<Option<TaskState>, TaskStoreError>
pub async fn list_tasks_for_owner( &self, owner_thread_id: &str, ) -> Result<Vec<TaskState>, TaskStoreError>
pub async fn start_task_attempt( &self, task_id: &str, ) -> Result<TaskState, TaskStoreError>
pub async fn mark_cancel_requested( &self, task_id: &str, ) -> Result<(), TaskStoreError>
pub async fn set_checkpoint( &self, task_id: &str, checkpoint: Value, ) -> Result<(), TaskStoreError>
pub async fn persist_summary( &self, summary: &TaskSummary, ) -> Result<(), TaskStoreError>
pub async fn persist_foreground_result( &self, task_id: &str, status: TaskStatus, error: Option<String>, result: Option<Value>, ) -> Result<(), TaskStoreError>
pub async fn load_output_text( &self, task: &TaskState, ) -> Result<Option<String>, TaskStoreError>
pub async fn descendant_ids_for_owner( &self, owner_thread_id: &str, root_task_id: &str, ) -> Result<Vec<TaskId>, TaskStoreError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TaskStore
impl !RefUnwindSafe for TaskStore
impl Send for TaskStore
impl Sync for TaskStore
impl Unpin for TaskStore
impl !UnwindSafe for TaskStore
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