Struct fs2::repository::FakeGitRepository
source · pub struct FakeGitRepository { /* private fields */ }
Implementations§
source§impl FakeGitRepository
impl FakeGitRepository
pub fn open( state: Arc<Mutex<FakeGitRepositoryState>> ) -> Arc<Mutex<dyn GitRepository>>
Trait Implementations§
source§impl Clone for FakeGitRepository
impl Clone for FakeGitRepository
source§fn clone(&self) -> FakeGitRepository
fn clone(&self) -> FakeGitRepository
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FakeGitRepository
impl Debug for FakeGitRepository
source§impl Default for FakeGitRepository
impl Default for FakeGitRepository
source§fn default() -> FakeGitRepository
fn default() -> FakeGitRepository
Returns the “default value” for a type. Read more
source§impl GitRepository for FakeGitRepository
impl GitRepository for FakeGitRepository
fn reload_index(&self)
fn load_index_text(&self, path: &Path) -> Option<String>
fn branch_name(&self) -> Option<String>
source§fn staged_statuses(
&self,
path_prefix: &Path
) -> TreeMap<RepoPath, GitFileStatus>
fn staged_statuses( &self, path_prefix: &Path ) -> TreeMap<RepoPath, GitFileStatus>
Get the statuses of all of the files in the index that start with the given
path and have changes with resepect to the HEAD commit. This is fast because
the index stores hashes of trees, so that unchanged directories can be skipped.
source§fn unstaged_status(
&self,
_path: &RepoPath,
_mtime: SystemTime
) -> Option<GitFileStatus>
fn unstaged_status( &self, _path: &RepoPath, _mtime: SystemTime ) -> Option<GitFileStatus>
Get the status of a given file in the working directory with respect to
the index. In the common case, when there are no changes, this only requires
an index lookup. The index stores the mtime of each file when it was added,
so there’s no work to do if the mtime matches.
source§fn status(&self, path: &RepoPath, _mtime: SystemTime) -> Option<GitFileStatus>
fn status(&self, path: &RepoPath, _mtime: SystemTime) -> Option<GitFileStatus>
Get the status of a given file in the working directory with respect to
the HEAD commit. In the common case, when there are no changes, this only
requires an index lookup and blob comparison between the index and the HEAD
commit. The index stores the mtime of each file when it was added, so there’s
no need to consider the working directory file if the mtime matches.
fn branches(&self) -> Result<Vec<Branch>>
fn change_branch(&self, name: &str) -> Result<()>
fn create_branch(&self, name: &str) -> Result<()>
Auto Trait Implementations§
impl !RefUnwindSafe for FakeGitRepository
impl Send for FakeGitRepository
impl Sync for FakeGitRepository
impl Unpin for FakeGitRepository
impl !UnwindSafe for FakeGitRepository
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