pub struct GitRepo { /* private fields */ }
Expand description
Represents a git repository.
Implementations§
Source§impl GitRepo
impl GitRepo
Sourcepub fn has_changes(&self) -> Result<bool, GitError>
pub fn has_changes(&self) -> Result<bool, GitError>
Checks if the repository has uncommitted changes.
§Returns
Ok(bool)
- True if the repository has uncommitted changes, false otherwiseErr(GitError)
- If the operation failed
Sourcepub fn pull(&self) -> Result<Self, GitError>
pub fn pull(&self) -> Result<Self, GitError>
Pulls the latest changes from the remote repository.
§Returns
Ok(Self)
- The GitRepo object for method chainingErr(GitError)
- If the pull operation failed
Sourcepub fn reset(&self) -> Result<Self, GitError>
pub fn reset(&self) -> Result<Self, GitError>
Resets any local changes in the repository.
§Returns
Ok(Self)
- The GitRepo object for method chainingErr(GitError)
- If the reset operation failed
Trait Implementations§
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