pub struct AgentTaskStore { /* private fields */ }Expand description
Manages local task assignment records stored in .heddle/agent-tasks/.
Implementations§
Source§impl AgentTaskStore
impl AgentTaskStore
Sourcepub fn create(&self, record: AgentTaskRecord) -> Result<AgentTaskRecord>
pub fn create(&self, record: AgentTaskRecord) -> Result<AgentTaskRecord>
Create and persist a task, generating a task id when absent.
Sourcepub fn list(&self) -> Result<Vec<AgentTaskRecord>>
pub fn list(&self) -> Result<Vec<AgentTaskRecord>>
List all task records, most-recently-updated first.
Sourcepub fn update<F>(
&self,
task_id: &str,
update: F,
) -> Result<Option<AgentTaskRecord>>where
F: FnMut(&mut AgentTaskRecord),
pub fn update<F>(
&self,
task_id: &str,
update: F,
) -> Result<Option<AgentTaskRecord>>where
F: FnMut(&mut AgentTaskRecord),
Mutate an existing task under the task-store write lock.
Auto Trait Implementations§
impl Freeze for AgentTaskStore
impl RefUnwindSafe for AgentTaskStore
impl Send for AgentTaskStore
impl Sync for AgentTaskStore
impl Unpin for AgentTaskStore
impl UnsafeUnpin for AgentTaskStore
impl UnwindSafe for AgentTaskStore
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