pub struct TaskStore { /* private fields */ }Implementations§
Source§impl TaskStore
impl TaskStore
pub fn new(db: Database) -> TaskStore
pub async fn save(&self, task: &Task) -> Result<(), ServerError>
pub async fn get(&self, task_id: &str) -> Result<Option<Task>, ServerError>
pub async fn list_by_workspace( &self, workspace_id: &str, ) -> Result<Vec<Task>, ServerError>
pub async fn list_by_session( &self, session_id: &str, ) -> Result<Vec<Task>, ServerError>
pub async fn list_by_status( &self, workspace_id: &str, status: &TaskStatus, ) -> Result<Vec<Task>, ServerError>
pub async fn list_by_assignee( &self, agent_id: &str, ) -> Result<Vec<Task>, ServerError>
pub async fn find_ready_tasks( &self, workspace_id: &str, ) -> Result<Vec<Task>, ServerError>
pub async fn update_status( &self, task_id: &str, status: &TaskStatus, ) -> Result<(), ServerError>
pub async fn delete(&self, task_id: &str) -> Result<(), ServerError>
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 UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more