pub struct TasksRoot { /* private fields */ }Expand description
Root directory of Claude Code’s task-tool state. Defaults to
~/.claude/tasks; override with TasksRoot::at for tests or
non-default installs.
Implementations§
Source§impl TasksRoot
impl TasksRoot
Sourcepub fn home() -> Result<Self>
pub fn home() -> Result<Self>
Resolve the default ~/.claude/tasks. Errors if $HOME
(or the platform-specific user home) cannot be determined.
Sourcepub fn at(path: impl Into<PathBuf>) -> Self
pub fn at(path: impl Into<PathBuf>) -> Self
Use a specific path as the tasks root. Useful for tests (point at a tempdir) and for non-default installs.
Sourcepub fn list_sessions(&self) -> Result<Vec<TaskListSummary>>
pub fn list_sessions(&self) -> Result<Vec<TaskListSummary>>
List every session directory at the root, sorted by session id, with the number of task files in each. A missing root returns an empty vec.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TasksRoot
impl RefUnwindSafe for TasksRoot
impl Send for TasksRoot
impl Sync for TasksRoot
impl Unpin for TasksRoot
impl UnsafeUnpin for TasksRoot
impl UnwindSafe for TasksRoot
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