pub struct WorkspaceManager;Expand description
Compatibility facade for workspace operations.
Implementations§
Source§impl WorkspaceManager
impl WorkspaceManager
Sourcepub fn load(root: &Path) -> Result<WorkspaceConfig, AppError>
pub fn load(root: &Path) -> Result<WorkspaceConfig, AppError>
Load a specific workspace by root path.
Sourcepub fn save(workspace: &WorkspaceConfig) -> Result<(), AppError>
pub fn save(workspace: &WorkspaceConfig) -> Result<(), AppError>
Save a workspace config (create or update).
Sourcepub fn cache_path(root: &Path) -> PathBuf
pub fn cache_path(root: &Path) -> PathBuf
Returns the cache file path for a workspace root.
Sourcepub fn sync_history_path(root: &Path) -> PathBuf
pub fn sync_history_path(root: &Path) -> PathBuf
Returns the sync history file path for a workspace root.
Sourcepub fn detect_from_cwd(start: &Path) -> Option<PathBuf>
pub fn detect_from_cwd(start: &Path) -> Option<PathBuf>
Walk up from start to find the nearest .git-same/config.toml.
Sourcepub fn resolve(
name: Option<&str>,
config: &Config,
) -> Result<WorkspaceConfig, AppError>
pub fn resolve( name: Option<&str>, config: &Config, ) -> Result<WorkspaceConfig, AppError>
Resolve which workspace to use.
Sourcepub fn resolve_from_list(
workspaces: Vec<WorkspaceConfig>,
) -> Result<WorkspaceConfig, AppError>
pub fn resolve_from_list( workspaces: Vec<WorkspaceConfig>, ) -> Result<WorkspaceConfig, AppError>
Resolve from an already-loaded list of workspaces (no filesystem access).
Auto Trait Implementations§
impl Freeze for WorkspaceManager
impl RefUnwindSafe for WorkspaceManager
impl Send for WorkspaceManager
impl Sync for WorkspaceManager
impl Unpin for WorkspaceManager
impl UnsafeUnpin for WorkspaceManager
impl UnwindSafe for WorkspaceManager
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