pub struct Storage { /* private fields */ }Implementations§
Source§impl Storage
impl Storage
pub fn new(project_root: Option<PathBuf>) -> Self
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 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 workflow state 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