Skip to main content

Repo

Trait Repo 

Source
pub trait Repo {
    // Required methods
    fn g2(&self) -> &Repository;
    fn dir(&self) -> &str;
    fn cfg(&self) -> &Config;
    fn def_refname(&self) -> &str;

    // Provided methods
    fn get_tree_maybe(&self, refname: &str) -> Result<Option<Tree<'_>>, AE> { ... }
    fn get_tree<'r>(&'r self, refspec: RefSpec<'r>) -> Result<Tree<'r>, AE> { ... }
    fn file(
        &self,
        refspec: RefSpec<'_>,
        path: &str,
    ) -> Result<Option<String>, AE> { ... }
    fn files(&self, refspec: RefSpec<'_>, path: &str) -> Result<Vec<String>, AE> { ... }
    fn run_git(
        &mut self,
        want: bool,
        doing: &str,
        u: &mut dyn FnMut(&mut Command) -> Result<(), AE>,
    ) -> Result<(), AE> { ... }
}

Required Methods§

Source

fn g2(&self) -> &Repository

Source

fn dir(&self) -> &str

Source

fn cfg(&self) -> &Config

Source

fn def_refname(&self) -> &str

Provided Methods§

Source

fn get_tree_maybe(&self, refname: &str) -> Result<Option<Tree<'_>>, AE>

Source

fn get_tree<'r>(&'r self, refspec: RefSpec<'r>) -> Result<Tree<'r>, AE>

Source

fn file(&self, refspec: RefSpec<'_>, path: &str) -> Result<Option<String>, AE>

Source

fn files(&self, refspec: RefSpec<'_>, path: &str) -> Result<Vec<String>, AE>

Source

fn run_git( &mut self, want: bool, doing: &str, u: &mut dyn FnMut(&mut Command) -> Result<(), AE>, ) -> Result<(), AE>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§