pub struct Storage { /* private fields */ }Implementations§
Source§impl Storage
impl Storage
pub fn new(project_root: Option<PathBuf>) -> Self
Sourcepub fn project_root(&self) -> &Path
pub fn project_root(&self) -> &Path
Get the project root directory
pub fn scud_dir(&self) -> PathBuf
pub fn tasks_file(&self) -> PathBuf
pub fn config_file(&self) -> PathBuf
pub fn docs_dir(&self) -> PathBuf
pub fn guidance_dir(&self) -> PathBuf
Sourcepub fn load_guidance(&self) -> Result<String>
pub fn load_guidance(&self) -> Result<String>
Load all .md files from .scud/guidance/ folder Returns concatenated content with file headers, or empty string if no files
pub fn is_initialized(&self) -> bool
pub fn initialize(&self) -> Result<()>
pub fn initialize_with_config(&self, config: &Config) -> Result<()>
pub fn load_config(&self) -> Result<Config>
pub fn load_tasks(&self) -> Result<HashMap<String, Phase>>
pub fn save_tasks(&self, tasks: &HashMap<String, Phase>) -> Result<()>
pub fn get_active_group(&self) -> Result<Option<String>>
pub fn set_active_group(&self, group_tag: &str) -> Result<()>
Sourcepub fn clear_cache(&self)
pub fn clear_cache(&self)
Clear the active group cache Useful when active-tag file is modified externally or for testing
Sourcepub fn clear_active_group(&self) -> Result<()>
pub fn clear_active_group(&self) -> Result<()>
Clear the active group setting (remove the active-tag file)
Sourcepub fn load_group(&self, group_tag: &str) -> Result<Phase>
pub fn load_group(&self, group_tag: &str) -> Result<Phase>
Load a single task group by tag Parses the SCG file and extracts the requested group
Sourcepub fn load_active_group(&self) -> Result<Phase>
pub fn load_active_group(&self) -> Result<Phase>
Load the active task group directly (optimized) Combines get_active_group() and load_group() in one call
Sourcepub fn update_group(&self, group_tag: &str, group: &Phase) -> Result<()>
pub fn update_group(&self, group_tag: &str, group: &Phase) -> Result<()>
Update a single task group atomically Holds exclusive lock across read-modify-write cycle to prevent races
pub fn read_file(&self, path: &Path) -> Result<String>
Auto Trait Implementations§
impl !Freeze for Storage
impl RefUnwindSafe for Storage
impl Send for Storage
impl Sync for Storage
impl Unpin for Storage
impl UnwindSafe for Storage
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