pub struct TreeState { /* private fields */ }Implementations§
Source§impl TreeState
impl TreeState
pub fn working_copy_path(&self) -> &Path
pub fn current_tree(&self) -> &MergedTree
pub fn file_states(&self) -> FileStates<'_>
pub fn sparse_patterns(&self) -> &Vec<RepoPathBuf>
pub fn init( store: Arc<Store>, working_copy_path: PathBuf, state_path: PathBuf, tree_state_settings: &TreeStateSettings, ) -> Result<Self, TreeStateError>
pub fn load( store: Arc<Store>, working_copy_path: PathBuf, state_path: PathBuf, tree_state_settings: &TreeStateSettings, ) -> Result<Self, TreeStateError>
pub fn save(&mut self) -> Result<(), TreeStateError>
Source§impl TreeState
Functions to snapshot local-disk files to the store.
impl TreeState
Functions to snapshot local-disk files to the store.
Sourcepub async fn snapshot(
&mut self,
options: &SnapshotOptions<'_>,
) -> Result<(bool, SnapshotStats), SnapshotError>
pub async fn snapshot( &mut self, options: &SnapshotOptions<'_>, ) -> Result<(bool, SnapshotStats), SnapshotError>
Look for changes to the working copy. If there are any changes, create a new tree from it.
Source§impl TreeState
Functions to update local-disk files from the store.
impl TreeState
Functions to update local-disk files from the store.
pub fn check_out( &mut self, new_tree: &MergedTree, ) -> Result<CheckoutStats, CheckoutError>
pub fn set_sparse_patterns( &mut self, sparse_patterns: Vec<RepoPathBuf>, ) -> Result<CheckoutStats, CheckoutError>
pub async fn reset(&mut self, new_tree: &MergedTree) -> Result<(), ResetError>
pub async fn recover(&mut self, new_tree: &MergedTree) -> Result<(), ResetError>
Auto Trait Implementations§
impl Freeze for TreeState
impl !RefUnwindSafe for TreeState
impl Send for TreeState
impl Sync for TreeState
impl Unpin for TreeState
impl UnsafeUnpin for TreeState
impl !UnwindSafe for TreeState
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
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