pub struct SimpleWorkspaceStore { /* private fields */ }Expand description
A simple file-based implementation of WorkspaceStore.
Implementations§
Source§impl SimpleWorkspaceStore
impl SimpleWorkspaceStore
Sourcepub fn load(repo_path: &Path) -> Result<Self, WorkspaceStoreError>
pub fn load(repo_path: &Path) -> Result<Self, WorkspaceStoreError>
Loads the workspace store from the given repository path.
Trait Implementations§
Source§impl Debug for SimpleWorkspaceStore
impl Debug for SimpleWorkspaceStore
Source§impl WorkspaceStore for SimpleWorkspaceStore
impl WorkspaceStore for SimpleWorkspaceStore
Source§fn add(
&self,
workspace_name: &WorkspaceName,
path: &Path,
) -> Result<(), WorkspaceStoreError>
fn add( &self, workspace_name: &WorkspaceName, path: &Path, ) -> Result<(), WorkspaceStoreError>
Adds a workspace with the given name and path to the store.
Source§fn forget(
&self,
workspace_names: &[&WorkspaceName],
) -> Result<(), WorkspaceStoreError>
fn forget( &self, workspace_names: &[&WorkspaceName], ) -> Result<(), WorkspaceStoreError>
Forgets the workspaces with the given names.
Source§fn rename(
&self,
old_name: &WorkspaceName,
new_name: &WorkspaceName,
) -> Result<(), WorkspaceStoreError>
fn rename( &self, old_name: &WorkspaceName, new_name: &WorkspaceName, ) -> Result<(), WorkspaceStoreError>
Renames a workspace from
old_name to new_name.Source§fn get_workspace_path(
&self,
workspace_name: &WorkspaceName,
) -> Result<Option<PathBuf>, WorkspaceStoreError>
fn get_workspace_path( &self, workspace_name: &WorkspaceName, ) -> Result<Option<PathBuf>, WorkspaceStoreError>
Gets the path of the workspace with the given name, if it exists.
Auto Trait Implementations§
impl Freeze for SimpleWorkspaceStore
impl RefUnwindSafe for SimpleWorkspaceStore
impl Send for SimpleWorkspaceStore
impl Sync for SimpleWorkspaceStore
impl Unpin for SimpleWorkspaceStore
impl UnwindSafe for SimpleWorkspaceStore
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