Trait GitLike

Source
pub trait GitLike: Sized {
    type CurrentDir: AsRef<Utf8Path>;

    // Required method
    fn as_git(&self) -> &Git<Self::CurrentDir>;

    // Provided methods
    fn get_current_dir(&self) -> &Self::CurrentDir { ... }
    fn command(&self) -> Command { ... }
    fn remote(&self) -> GitRemote<'_, Self> { ... }
    fn path(&self) -> GitPath<'_, Self> { ... }
    fn worktree(&self) -> GitWorktree<'_, Self> { ... }
    fn refs(&self) -> GitRefs<'_, Self> { ... }
    fn status(&self) -> GitStatus<'_, Self> { ... }
    fn config(&self) -> GitConfig<'_, Self> { ... }
    fn branch(&self) -> GitBranch<'_, Self> { ... }
}

Required Associated Types§

Required Methods§

Source

fn as_git(&self) -> &Git<Self::CurrentDir>

Provided Methods§

Source

fn get_current_dir(&self) -> &Self::CurrentDir

Source

fn command(&self) -> Command

Get a git command.

Source

fn remote(&self) -> GitRemote<'_, Self>

Methods for dealing with Git remotes.

Source

fn path(&self) -> GitPath<'_, Self>

Methods for dealing with Git remotes.

Source

fn worktree(&self) -> GitWorktree<'_, Self>

Methods for dealing with Git remotes.

Source

fn refs(&self) -> GitRefs<'_, Self>

Methods for dealing with Git refs.

Source

fn status(&self) -> GitStatus<'_, Self>

Methods for dealing with Git statuses and the working tree.

Source

fn config(&self) -> GitConfig<'_, Self>

Methods for dealing with Git statuses and the working tree.

Source

fn branch(&self) -> GitBranch<'_, Self>

Methods for dealing with Git statuses and the working tree.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<C> GitLike for AppGit<'_, C>
where C: AsRef<Utf8Path>,

Source§

impl<C> GitLike for Git<C>
where C: AsRef<Utf8Path>,