pub struct Workspace { /* private fields */ }
Expand description
Provides access to data stored in the user’s project directory.
The directory contains a subdirectory for each crate the user wants
to process. When running any operations, the data is read from and
saved to the workspace files. Global workspace configuration
can also be set through the Workspace
object.
Implementations
sourceimpl Workspace
impl Workspace
pub fn new(path: PathBuf) -> Result<Workspace>
pub fn path(&self) -> &Path
pub fn tmp_path(&self) -> Result<PathBuf>
pub fn config(&self) -> &WorkspaceConfig
pub fn log_path(&self) -> Result<PathBuf>
pub fn crate_path(&self, crate_name: &str) -> Result<PathBuf>
pub fn import_published_crate(&mut self, crate_name: &str) -> Result<()>
pub fn load_crate(&mut self, crate_name: &str) -> Result<Database>
pub fn load_or_create_crate(&mut self, crate_name: &str) -> Result<Database>
pub fn put_crate(&mut self, database: Database, saved: bool)
pub fn set_write_dependencies_local_paths(&mut self, value: bool) -> Result<()>
pub fn save_data(&mut self) -> Result<()>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Workspace
impl Send for Workspace
impl Sync for Workspace
impl Unpin for Workspace
impl UnwindSafe for Workspace
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more