pub struct SimpleWorkspaceStore { /* private fields */ }Expand description
A simple file-based implementation of WorkspaceStore.
Implementations§
Source§impl SimpleWorkspaceStore
impl SimpleWorkspaceStore
Sourcepub const NAME: &str = "simple_workspace_store"
pub const NAME: &str = "simple_workspace_store"
The name of this WorkspaceStore implementation.
Sourcepub fn load(store_dir: &Path) -> Result<Self, BackendLoadError>
pub fn load(store_dir: &Path) -> Result<Self, BackendLoadError>
Loads the workspace store from the given store path and repo.
Sourcepub fn init(store_dir: &Path) -> Result<Self, BackendInitError>
pub fn init(store_dir: &Path) -> Result<Self, BackendInitError>
Initializes this SimpleWorkspaceStore with an empty index.
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. Read more
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>
Returns the absolute path of the specified workspace, if known.
Auto Trait Implementations§
impl Freeze for SimpleWorkspaceStore
impl RefUnwindSafe for SimpleWorkspaceStore
impl Send for SimpleWorkspaceStore
impl Sync for SimpleWorkspaceStore
impl Unpin for SimpleWorkspaceStore
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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