pub struct Scratch { /* private fields */ }Expand description
A temporary worktree of one revision, outside the checkout, removed when it drops, also on failure.
Implementations§
Source§impl Scratch
impl Scratch
Sourcepub fn new(root: &Utf8Path, rev: &str) -> Result<Self, RkError>
pub fn new(root: &Utf8Path, rev: &str) -> Result<Self, RkError>
Check out rev into a fresh directory under the system’s temporary
directory, with no hook run.
§Errors
A directory that cannot be created, or git’s failure.
Sourcepub fn tree(&self) -> Utf8PathBuf
pub fn tree(&self) -> Utf8PathBuf
The worktree.
Sourcepub fn out(&self) -> Utf8PathBuf
pub fn out(&self) -> Utf8PathBuf
A directory beside the worktree, outside it, for build output.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Scratch
impl Freeze for Scratch
impl Move for Scratch
impl RefUnwindSafe for Scratch
impl Send for Scratch
impl Sync for Scratch
impl Unpin for Scratch
impl UnsafeUnpin for Scratch
impl UnwindSafe for Scratch
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