pub struct GitRepo { /* private fields */ }Implementations§
Source§impl GitRepo
impl GitRepo
pub fn open(path: impl AsRef<Path>) -> Result<Self>
pub fn discover(path: impl AsRef<Path>) -> Result<Self>
pub fn path(&self) -> &Path
pub fn git_dir(&self) -> PathBuf
pub fn is_bare(&self) -> bool
pub fn status(&self) -> Result<RepoStatus>
pub fn current_branch(&self) -> Result<Option<BranchInfo>>
pub fn branches(&self) -> Result<Vec<BranchInfo>>
pub fn recent_commits(&self, count: usize) -> Result<Vec<CommitInfo>>
pub fn is_dirty(&self) -> Result<bool>
pub fn head_commit(&self) -> Result<Option<CommitInfo>>
pub fn inner(&self) -> &Repository
Auto Trait Implementations§
impl Freeze for GitRepo
impl RefUnwindSafe for GitRepo
impl Send for GitRepo
impl !Sync for GitRepo
impl Unpin for GitRepo
impl UnwindSafe for GitRepo
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