pub struct Workspace { /* private fields */ }Implementations§
Source§impl Workspace
impl Workspace
pub fn init(path: impl AsRef<Path>) -> Result<Workspace, WorkspaceError>
pub fn open(path: impl AsRef<Path>) -> Result<Workspace, WorkspaceError>
Sourcepub fn open_or_init(path: impl AsRef<Path>) -> Result<Workspace, WorkspaceError>
pub fn open_or_init(path: impl AsRef<Path>) -> Result<Workspace, WorkspaceError>
Open a workspace, creating it only when the requested path is missing.
pub fn root(&self) -> &Path
pub fn manifest(&self) -> &WorkspaceManifest
pub fn database_path(&self) -> PathBuf
pub fn database(&self) -> Result<Database, WorkspaceError>
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