pub trait TaskBackend: Send + Sync {
Show 22 methods
// Required methods
fn get_task(&self, id: i64) -> impl Future<Output = Result<Task>> + Send;
fn get_task_with_events(
&self,
id: i64,
) -> impl Future<Output = Result<TaskWithEvents>> + Send;
fn get_task_ancestry(
&self,
task_id: i64,
) -> impl Future<Output = Result<Vec<Task>>> + Send;
fn get_task_context(
&self,
id: i64,
) -> impl Future<Output = Result<TaskContext>> + Send;
fn get_siblings(
&self,
id: i64,
parent_id: Option<i64>,
) -> impl Future<Output = Result<Vec<Task>>> + Send;
fn get_children(
&self,
id: i64,
) -> impl Future<Output = Result<Vec<Task>>> + Send;
fn get_blocking_tasks(
&self,
id: i64,
) -> impl Future<Output = Result<Vec<Task>>> + Send;
fn get_blocked_by_tasks(
&self,
id: i64,
) -> impl Future<Output = Result<Vec<Task>>> + Send;
fn get_descendants(
&self,
task_id: i64,
) -> impl Future<Output = Result<Vec<Task>>> + Send;
fn get_status(
&self,
task_id: i64,
with_events: bool,
) -> impl Future<Output = Result<StatusResponse>> + Send;
fn get_root_tasks(&self) -> impl Future<Output = Result<Vec<Task>>> + Send;
fn find_tasks(
&self,
status: Option<String>,
parent_id: Option<Option<i64>>,
sort_by: Option<TaskSortBy>,
limit: Option<i64>,
offset: Option<i64>,
) -> impl Future<Output = Result<PaginatedTasks>> + Send;
fn add_task(
&self,
name: String,
spec: Option<String>,
parent_id: Option<i64>,
owner: Option<String>,
priority: Option<i32>,
metadata: Option<String>,
) -> impl Future<Output = Result<Task>> + Send;
fn update_task(
&self,
id: i64,
update: TaskUpdate<'_>,
) -> impl Future<Output = Result<Task>> + Send;
fn delete_task(&self, id: i64) -> impl Future<Output = Result<()>> + Send;
fn delete_task_cascade(
&self,
id: i64,
) -> impl Future<Output = Result<usize>> + Send;
fn add_dependency(
&self,
blocking_id: i64,
blocked_id: i64,
) -> impl Future<Output = Result<()>> + Send;
fn remove_dependency(
&self,
blocking_id: i64,
blocked_id: i64,
) -> impl Future<Output = Result<()>> + Send;
fn start_task(
&self,
id: i64,
with_events: bool,
) -> impl Future<Output = Result<TaskWithEvents>> + Send;
fn done_task(
&self,
is_ai_caller: bool,
) -> impl Future<Output = Result<DoneTaskResponse>> + Send;
fn done_task_by_id(
&self,
id: i64,
is_ai_caller: bool,
) -> impl Future<Output = Result<DoneTaskResponse>> + Send;
fn pick_next(&self) -> impl Future<Output = Result<PickNextResponse>> + Send;
}Expand description
Task CRUD + lifecycle operations.
Required Methods§
fn get_task(&self, id: i64) -> impl Future<Output = Result<Task>> + Send
fn get_task_with_events( &self, id: i64, ) -> impl Future<Output = Result<TaskWithEvents>> + Send
fn get_task_ancestry( &self, task_id: i64, ) -> impl Future<Output = Result<Vec<Task>>> + Send
fn get_task_context( &self, id: i64, ) -> impl Future<Output = Result<TaskContext>> + Send
fn get_siblings( &self, id: i64, parent_id: Option<i64>, ) -> impl Future<Output = Result<Vec<Task>>> + Send
fn get_children( &self, id: i64, ) -> impl Future<Output = Result<Vec<Task>>> + Send
fn get_blocking_tasks( &self, id: i64, ) -> impl Future<Output = Result<Vec<Task>>> + Send
fn get_blocked_by_tasks( &self, id: i64, ) -> impl Future<Output = Result<Vec<Task>>> + Send
fn get_descendants( &self, task_id: i64, ) -> impl Future<Output = Result<Vec<Task>>> + Send
fn get_status( &self, task_id: i64, with_events: bool, ) -> impl Future<Output = Result<StatusResponse>> + Send
fn get_root_tasks(&self) -> impl Future<Output = Result<Vec<Task>>> + Send
fn find_tasks( &self, status: Option<String>, parent_id: Option<Option<i64>>, sort_by: Option<TaskSortBy>, limit: Option<i64>, offset: Option<i64>, ) -> impl Future<Output = Result<PaginatedTasks>> + Send
fn add_task( &self, name: String, spec: Option<String>, parent_id: Option<i64>, owner: Option<String>, priority: Option<i32>, metadata: Option<String>, ) -> impl Future<Output = Result<Task>> + Send
fn update_task( &self, id: i64, update: TaskUpdate<'_>, ) -> impl Future<Output = Result<Task>> + Send
fn delete_task(&self, id: i64) -> impl Future<Output = Result<()>> + Send
fn delete_task_cascade( &self, id: i64, ) -> impl Future<Output = Result<usize>> + Send
fn add_dependency( &self, blocking_id: i64, blocked_id: i64, ) -> impl Future<Output = Result<()>> + Send
fn remove_dependency( &self, blocking_id: i64, blocked_id: i64, ) -> impl Future<Output = Result<()>> + Send
fn start_task( &self, id: i64, with_events: bool, ) -> impl Future<Output = Result<TaskWithEvents>> + Send
fn done_task( &self, is_ai_caller: bool, ) -> impl Future<Output = Result<DoneTaskResponse>> + Send
fn done_task_by_id( &self, id: i64, is_ai_caller: bool, ) -> impl Future<Output = Result<DoneTaskResponse>> + Send
fn pick_next(&self) -> impl Future<Output = Result<PickNextResponse>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.