Struct jj_lib::working_copy::WorkingCopy
source · pub struct WorkingCopy { /* private fields */ }
Implementations§
source§impl WorkingCopy
impl WorkingCopy
sourcepub fn init(
store: Arc<Store>,
working_copy_path: PathBuf,
state_path: PathBuf,
operation_id: OperationId,
workspace_id: WorkspaceId
) -> Result<WorkingCopy, TreeStateError>
pub fn init( store: Arc<Store>, working_copy_path: PathBuf, state_path: PathBuf, operation_id: OperationId, workspace_id: WorkspaceId ) -> Result<WorkingCopy, TreeStateError>
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 working_copy_path(&self) -> &Path
pub fn state_path(&self) -> &Path
pub fn operation_id(&self) -> &OperationId
pub fn workspace_id(&self) -> &WorkspaceId
pub fn current_tree_id(&self) -> Result<&TreeId, TreeStateError>
pub fn file_states( &self ) -> Result<&BTreeMap<RepoPath, FileState>, TreeStateError>
pub fn sparse_patterns(&self) -> Result<&[RepoPath], TreeStateError>
pub fn start_mutation( &mut self ) -> Result<LockedWorkingCopy<'_>, TreeStateError>
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§
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