pub struct PlanStore { /* private fields */ }Expand description
Shared state for plan tools, managing the plans directory and per-file locks.
Implementations§
Source§impl PlanStore
impl PlanStore
Sourcepub fn new(workspace_root: PathBuf) -> Self
pub fn new(workspace_root: PathBuf) -> Self
Create a new PlanStore rooted at the given workspace directory.
Sourcepub async fn acquire_lock(&self, path: &Path) -> Arc<Mutex<()>>
pub async fn acquire_lock(&self, path: &Path) -> Arc<Mutex<()>>
Returns a per-file mutex for the given path, creating one if it does not exist.
Sourcepub async fn get_next_plan_id(&self) -> Result<String, String>
pub async fn get_next_plan_id(&self) -> Result<String, String>
Scans the plans directory for existing plan-NNN.md files and returns
the next sequential plan ID (e.g., plan-001, plan-002).
Sourcepub fn status_to_marker(status: &str) -> Result<&'static str, String>
pub fn status_to_marker(status: &str) -> Result<&'static str, String>
Converts a step status string to its markdown checkbox marker.
Sourcepub fn marker_to_status(marker: &str) -> &'static str
pub fn marker_to_status(marker: &str) -> &'static str
Converts a markdown checkbox marker to its status string.
Auto Trait Implementations§
impl !Freeze for PlanStore
impl !RefUnwindSafe for PlanStore
impl Send for PlanStore
impl Sync for PlanStore
impl Unpin for PlanStore
impl !UnwindSafe for PlanStore
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