pub struct PlansRoot { /* private fields */ }Expand description
Root directory of Claude Code’s saved plan documents. Defaults
to ~/.claude/plans; override with PlansRoot::at for tests
or non-default installs.
Implementations§
Source§impl PlansRoot
impl PlansRoot
Sourcepub fn home() -> Result<Self>
pub fn home() -> Result<Self>
Resolve the default ~/.claude/plans. 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 plans root. Useful for tests (point at a tempdir) and for non-default installs.
Sourcepub fn list(&self) -> Result<Vec<PlanSummary>>
pub fn list(&self) -> Result<Vec<PlanSummary>>
List every plan at the root, most recently modified first (ties broken by file stem). A missing root returns an empty vec. Files that fail to read contribute a tracing warning and are skipped.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PlansRoot
impl RefUnwindSafe for PlansRoot
impl Send for PlansRoot
impl Sync for PlansRoot
impl Unpin for PlansRoot
impl UnsafeUnpin for PlansRoot
impl UnwindSafe for PlansRoot
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