pub struct Workspace { /* private fields */ }Expand description
A workspace directory with one subdirectory per run.
Implementations§
Source§impl Workspace
impl Workspace
Sourcepub fn open(root: impl Into<PathBuf>) -> Result<Self, Error>
pub fn open(root: impl Into<PathBuf>) -> Result<Self, Error>
Opens or creates a workspace.
§Errors
Returns Error::InvalidInput when the directory cannot be created.
Sourcepub fn write_run(&self, record: &RunRecord) -> Result<PathBuf, Error>
pub fn write_run(&self, record: &RunRecord) -> Result<PathBuf, Error>
Writes a run record and creates its directory.
§Errors
Returns Error::InvalidInput when the directory or record cannot be
written.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Workspace
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