pub struct Workspace {
pub root: PathBuf,
pub config: WorkspaceConfig,
}Expand description
A Hexz workspace rooted at a directory with associated configuration.
Fields§
§root: PathBufRoot directory of the workspace.
config: WorkspaceConfigWorkspace configuration loaded from config.json.
Implementations§
Source§impl Workspace
impl Workspace
Sourcepub fn init(path: &Path, base_archive: Option<PathBuf>) -> Result<Self>
pub fn init(path: &Path, base_archive: Option<PathBuf>) -> Result<Self>
Initialize a new workspace at the given path with an optional base archive.
Sourcepub fn find(start_path: &Path) -> Result<Option<Self>>
pub fn find(start_path: &Path) -> Result<Option<Self>>
Search upward from start_path to find an existing workspace.
Sourcepub fn overlay_path(&self) -> PathBuf
pub fn overlay_path(&self) -> PathBuf
Return the path to the overlay directory for this workspace.
Sourcepub fn metadata_dir(&self) -> PathBuf
pub fn metadata_dir(&self) -> PathBuf
Return the path to the centralized metadata directory for this workspace.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Workspace
impl RefUnwindSafe for Workspace
impl Send for Workspace
impl Sync for Workspace
impl Unpin for Workspace
impl UnsafeUnpin for Workspace
impl UnwindSafe for Workspace
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