Struct jujutsu_lib::working_copy::WorkingCopy
source · [−]pub struct WorkingCopy { /* private fields */ }Implementations
sourceimpl WorkingCopy
impl WorkingCopy
sourcepub fn init(
store: Arc<Store>,
working_copy_path: PathBuf,
state_path: PathBuf,
operation_id: OperationId,
workspace_id: WorkspaceId
) -> WorkingCopy
pub fn init(
store: Arc<Store>,
working_copy_path: PathBuf,
state_path: PathBuf,
operation_id: OperationId,
workspace_id: WorkspaceId
) -> WorkingCopy
Initializes a new working copy at working_copy_path. The working
copy’s state will be stored in the state_path directory. The working
copy will have the empty tree checked out.
pub fn load(
store: Arc<Store>,
working_copy_path: PathBuf,
state_path: PathBuf
) -> WorkingCopy
pub fn state_path(&self) -> &Path
pub fn operation_id(&self) -> OperationId
pub fn workspace_id(&self) -> WorkspaceId
pub fn current_tree_id(&self) -> TreeId
pub fn file_states(&self) -> BTreeMap<RepoPath, FileState>
pub fn start_mutation(&mut self) -> LockedWorkingCopy<'_>
pub fn check_out(
&mut self,
operation_id: OperationId,
old_tree_id: Option<&TreeId>,
new_tree: &Tree
) -> Result<CheckoutStats, CheckoutError>
Auto Trait Implementations
impl !RefUnwindSafe for WorkingCopy
impl Send for WorkingCopy
impl !Sync for WorkingCopy
impl Unpin for WorkingCopy
impl !UnwindSafe for WorkingCopy
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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