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,
) -> 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 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) -> &TreeId
pub fn file_states(&self) -> &BTreeMap<RepoPath, FileState>
pub fn sparse_patterns(&self) -> &[RepoPath]
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 !Freeze for WorkingCopy
impl !RefUnwindSafe for WorkingCopy
impl !Sync for WorkingCopy
impl !UnwindSafe for WorkingCopy
impl Send for WorkingCopy
impl Unpin for WorkingCopy
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more