pub struct JobsRoot { /* private fields */ }Expand description
Root directory of Claude Code’s on-disk background-job state.
Defaults to ~/.claude/jobs; override with JobsRoot::at for
tests or non-default installs.
Implementations§
Source§impl JobsRoot
impl JobsRoot
Sourcepub fn home() -> Result<Self>
pub fn home() -> Result<Self>
Resolve the default ~/.claude/jobs. Errors if the user
home directory 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 jobs root. Useful for tests (point at a tempdir) and for non-default installs.
Sourcepub fn list(&self) -> Result<Vec<JobSummary>>
pub fn list(&self) -> Result<Vec<JobSummary>>
List every job directory at the root, sorted by short_id.
Returns an empty vec if the root directory doesn’t exist (no
background agents have been launched yet on this machine).
Skips entries that aren’t directories, that don’t carry a
state.json, or that fail to parse – those contribute a
tracing warning so silent skips are diagnosable.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JobsRoot
impl RefUnwindSafe for JobsRoot
impl Send for JobsRoot
impl Sync for JobsRoot
impl Unpin for JobsRoot
impl UnsafeUnpin for JobsRoot
impl UnwindSafe for JobsRoot
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