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) -> PlanStore
pub fn new(workspace_root: PathBuf) -> PlanStore
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more