pub struct TaskStore { /* private fields */ }Expand description
Thread-safe in-memory task store
Implementations§
Source§impl TaskStore
impl TaskStore
Sourcepub async fn get_flexible(&self, id: &str) -> Option<Task>
pub async fn get_flexible(&self, id: &str) -> Option<Task>
Get a task, trying multiple key formats
Tries: exact match, with “tasks/” prefix, without “tasks/” prefix
Sourcepub async fn update_flexible<F, E>(
&self,
id: &str,
f: F,
) -> Option<Result<Task, E>>
pub async fn update_flexible<F, E>( &self, id: &str, f: F, ) -> Option<Result<Task, E>>
Update a task with a fallible closure, trying multiple key formats
Returns:
Noneif task not foundSome(Err(e))if closure returned errorSome(Ok(task))if update succeeded
Sourcepub async fn list_filtered(&self, params: &ListTasksRequest) -> TaskListResponse
pub async fn list_filtered(&self, params: &ListTasksRequest) -> TaskListResponse
List tasks with filtering and pagination
Returns a TaskListResponse with filtered tasks and pagination info.
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