pub struct SimpleProjectManager { /* private fields */ }
Expand description
Simple project manager
Implementations§
Source§impl SimpleProjectManager
impl SimpleProjectManager
Sourcepub fn create_project(
&self,
name: &str,
description: Option<&str>,
) -> Result<()>
pub fn create_project( &self, name: &str, description: Option<&str>, ) -> Result<()>
Create a new project
Sourcepub fn load_project(&self, name: &str) -> Result<ProjectData>
pub fn load_project(&self, name: &str) -> Result<ProjectData>
Load a project by name
Sourcepub fn list_projects(&self) -> Result<Vec<String>>
pub fn list_projects(&self) -> Result<Vec<String>>
List all projects
Sourcepub fn delete_project(&self, name: &str) -> Result<()>
pub fn delete_project(&self, name: &str) -> Result<()>
Delete a project
Sourcepub fn update_project(&self, project: &ProjectData) -> Result<()>
pub fn update_project(&self, project: &ProjectData) -> Result<()>
Update project metadata
Sourcepub fn project_data_dir(&self, project_name: &str) -> PathBuf
pub fn project_data_dir(&self, project_name: &str) -> PathBuf
Get project data directory
Sourcepub fn config_dir(&self, project_name: &str) -> PathBuf
pub fn config_dir(&self, project_name: &str) -> PathBuf
Get project config directory
Sourcepub fn workspace_root(&self) -> &Path
pub fn workspace_root(&self) -> &Path
Get workspace root
Sourcepub fn project_exists(&self, name: &str) -> bool
pub fn project_exists(&self, name: &str) -> bool
Check if project exists
Sourcepub fn get_project_info(&self, name: &str) -> Result<String>
pub fn get_project_info(&self, name: &str) -> Result<String>
Get project info as simple text
Sourcepub fn identify_current_project(&self) -> Result<String>
pub fn identify_current_project(&self) -> Result<String>
Simple project identification from current directory
Sourcepub fn set_current_project(&self, name: &str) -> Result<()>
pub fn set_current_project(&self, name: &str) -> Result<()>
Set current project
Trait Implementations§
Source§impl Clone for SimpleProjectManager
impl Clone for SimpleProjectManager
Source§fn clone(&self) -> SimpleProjectManager
fn clone(&self) -> SimpleProjectManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for SimpleProjectManager
impl RefUnwindSafe for SimpleProjectManager
impl Send for SimpleProjectManager
impl Sync for SimpleProjectManager
impl Unpin for SimpleProjectManager
impl UnwindSafe for SimpleProjectManager
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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