pub struct TreeState { /* private fields */ }Implementations§
Source§impl TreeState
impl TreeState
pub fn current_tree_id(&self) -> &TreeId
pub fn file_states(&self) -> &BTreeMap<RepoPath, FileState>
pub fn sparse_patterns(&self) -> &Vec<RepoPath>
pub fn init( store: Arc<Store>, working_copy_path: PathBuf, state_path: PathBuf, ) -> TreeState
pub fn load( store: Arc<Store>, working_copy_path: PathBuf, state_path: PathBuf, ) -> TreeState
Sourcepub fn snapshot(
&mut self,
base_ignores: Arc<GitIgnoreFile>,
) -> Result<bool, SnapshotError>
pub fn snapshot( &mut self, base_ignores: Arc<GitIgnoreFile>, ) -> Result<bool, SnapshotError>
Look for changes to the working copy. If there are any changes, create a new tree from it.
pub fn check_out( &mut self, new_tree: &Tree, ) -> Result<CheckoutStats, CheckoutError>
pub fn set_sparse_patterns( &mut self, sparse_patterns: Vec<RepoPath>, ) -> Result<CheckoutStats, CheckoutError>
pub fn reset(&mut self, new_tree: &Tree) -> 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