Skip to main content

Commit

Trait Commit 

Source
pub trait Commit {
    // Required methods
    fn info<'life0, 'life1, 'async_trait>(
        &'life0 self,
        repo_path: RepoPath,
        sha: Option<&'life1 str>,
    ) -> Pin<Box<dyn Future<Output = Result<CommitInfo, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn list<'life0, 'async_trait>(
        &'life0 self,
        repo_path: RepoPath,
        option: Option<ListOptions>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<CommitListInfo>, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
}

Required Methods§

Source

fn info<'life0, 'life1, 'async_trait>( &'life0 self, repo_path: RepoPath, sha: Option<&'life1 str>, ) -> Pin<Box<dyn Future<Output = Result<CommitInfo, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

获取仓库提交信息

§参数
  • repo_path - 仓库路径
  • sha - 提交ID, 默认为最新提交
Source

fn list<'life0, 'async_trait>( &'life0 self, repo_path: RepoPath, option: Option<ListOptions>, ) -> Pin<Box<dyn Future<Output = Result<Vec<CommitListInfo>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

获取仓库所有提交信息

§参数
  • repo_path - 仓库路径
  • option - 获取提交列表选项, 详见 [CommitListOptions]

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§