pub struct GitService { /* private fields */ }Implementations§
Source§impl GitService
impl GitService
pub fn open(path: impl AsRef<Path>) -> GitResult<Self>
pub fn root(&self) -> &Path
pub fn set_timeout(&mut self, timeout: Duration) -> GitResult<()>
pub fn status(&self) -> GitResult<GitStatus>
pub fn diff(&self, staged: bool, path: Option<&str>) -> GitResult<String>
pub fn stage(&self, paths: &[String]) -> GitResult<()>
pub fn unstage(&self, paths: &[String]) -> GitResult<()>
pub fn discard(&self, paths: &[String]) -> GitResult<()>
pub fn fetch(&self, remote: Option<&str>) -> GitResult<()>
pub fn pull(&self, remote: Option<&str>, branch: Option<&str>) -> GitResult<()>
pub fn merge(&self, branch: &str) -> GitResult<()>
pub fn rebase(&self, onto: &str) -> GitResult<()>
pub fn push(&self, remote: Option<&str>, branch: Option<&str>) -> GitResult<()>
pub fn branches(&self) -> GitResult<Vec<GitBranch>>
pub fn create_branch( &self, name: &str, start_point: Option<&str>, ) -> GitResult<()>
pub fn switch_branch(&self, name: &str, create: bool) -> GitResult<()>
pub fn commit(&self, message: &str) -> GitResult<GitCommit>
pub fn commit_info(&self, revision: &str) -> GitResult<GitCommit>
pub fn blame( &self, path: &str, start_line: u64, end_line: u64, ) -> GitResult<String>
pub fn conflicts(&self) -> GitResult<Vec<String>>
pub fn stash_push( &self, message: &str, include_untracked: bool, ) -> GitResult<()>
pub fn stash_list(&self) -> GitResult<Vec<String>>
pub fn stash_pop(&self, reference: &str) -> GitResult<()>
pub fn worktrees(&self) -> GitResult<Vec<GitWorktree>>
pub fn create_worktree( &self, path: &Path, branch: &str, create_branch: bool, ) -> GitResult<()>
pub fn remove_worktree(&self, path: &Path, force: bool) -> GitResult<()>
Auto Trait Implementations§
impl Freeze for GitService
impl RefUnwindSafe for GitService
impl Send for GitService
impl Sync for GitService
impl Unpin for GitService
impl UnsafeUnpin for GitService
impl UnwindSafe for GitService
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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