pub trait Client: Send + Sync {
Show 19 methods
// Required methods
fn set_token(&mut self, token: &str) -> Result<(), Error>;
fn set_proxy(&mut self, proxy: &str) -> Result<(), Error>;
fn get_user_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<UserInfo, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_user_info_with_name<'life0, 'life1, 'async_trait>(
&'life0 self,
user_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<UserInfo, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn get_user_avatar_url<'life0, 'life1, 'async_trait>(
&'life0 self,
user_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn get_user_contribution<'life0, 'life1, 'async_trait>(
&'life0 self,
user_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ContributionResult, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn get_org_info<'life0, 'life1, 'async_trait>(
&'life0 self,
org_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<OrgInfo, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn get_org_repos<'life0, 'life1, 'async_trait>(
&'life0 self,
org_name: &'life1 str,
options: Option<OrgRepoListOptions>,
) -> Pin<Box<dyn Future<Output = Result<Vec<RepoInfo>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn get_org_avatar_url<'life0, 'life1, 'async_trait>(
&'life0 self,
org_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn get_repo_info<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
) -> Pin<Box<dyn Future<Output = Result<RepoInfo, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn get_user_repos<'life0, 'async_trait>(
&'life0 self,
option: Option<ReposListOptions>,
) -> Pin<Box<dyn Future<Output = Result<Vec<RepoInfo>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_user_repos_with_name<'life0, 'life1, 'async_trait>(
&'life0 self,
user_name: &'life1 str,
option: Option<ReposListOptions>,
) -> Pin<Box<dyn Future<Output = Result<Vec<RepoInfo>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn get_commit_info<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
sha: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<CommitInfo, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait;
fn get_commit_infos<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
option: Option<CommitListOptions>,
) -> Pin<Box<dyn Future<Output = Result<Vec<CommitInfo>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn add_repo_collaborator<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
user_name: &'life3 str,
permission: Option<CollaboratorPermission>,
) -> Pin<Box<dyn Future<Output = Result<CollaboratorResult, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait;
fn create_issue<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
title: &'life3 str,
body: Option<&'life4 str>,
option: Option<CreateIssueOptions>,
) -> Pin<Box<dyn Future<Output = Result<IssueInfo, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait;
fn get_issue_info<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
issue_number: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<IssueInfo, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait;
fn get_issue_list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
options: Option<IssueListOptions>,
) -> Pin<Box<dyn Future<Output = Result<Vec<IssueInfo>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn update_issue<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
issue_number: &'life3 str,
options: Option<UpdateIssueOptions>,
) -> Pin<Box<dyn Future<Output = Result<IssueInfo, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait;
}Required Methods§
Sourcefn get_user_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<UserInfo, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_user_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<UserInfo, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
获取当前授权用户信息
Sourcefn get_user_info_with_name<'life0, 'life1, 'async_trait>(
&'life0 self,
user_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<UserInfo, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_user_info_with_name<'life0, 'life1, 'async_trait>(
&'life0 self,
user_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<UserInfo, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sourcefn get_user_avatar_url<'life0, 'life1, 'async_trait>(
&'life0 self,
user_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_user_avatar_url<'life0, 'life1, 'async_trait>(
&'life0 self,
user_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sourcefn get_user_contribution<'life0, 'life1, 'async_trait>(
&'life0 self,
user_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ContributionResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_user_contribution<'life0, 'life1, 'async_trait>(
&'life0 self,
user_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ContributionResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
获取指定用户贡献数据
Sourcefn get_org_info<'life0, 'life1, 'async_trait>(
&'life0 self,
org_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<OrgInfo, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_org_info<'life0, 'life1, 'async_trait>(
&'life0 self,
org_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<OrgInfo, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sourcefn get_org_repos<'life0, 'life1, 'async_trait>(
&'life0 self,
org_name: &'life1 str,
options: Option<OrgRepoListOptions>,
) -> Pin<Box<dyn Future<Output = Result<Vec<RepoInfo>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_org_repos<'life0, 'life1, 'async_trait>(
&'life0 self,
org_name: &'life1 str,
options: Option<OrgRepoListOptions>,
) -> Pin<Box<dyn Future<Output = Result<Vec<RepoInfo>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sourcefn get_org_avatar_url<'life0, 'life1, 'async_trait>(
&'life0 self,
org_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_org_avatar_url<'life0, 'life1, 'async_trait>(
&'life0 self,
org_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sourcefn get_repo_info<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
) -> Pin<Box<dyn Future<Output = Result<RepoInfo, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn get_repo_info<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
) -> Pin<Box<dyn Future<Output = Result<RepoInfo, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Sourcefn get_user_repos<'life0, 'async_trait>(
&'life0 self,
option: Option<ReposListOptions>,
) -> Pin<Box<dyn Future<Output = Result<Vec<RepoInfo>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_user_repos<'life0, 'async_trait>(
&'life0 self,
option: Option<ReposListOptions>,
) -> Pin<Box<dyn Future<Output = Result<Vec<RepoInfo>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Sourcefn get_user_repos_with_name<'life0, 'life1, 'async_trait>(
&'life0 self,
user_name: &'life1 str,
option: Option<ReposListOptions>,
) -> Pin<Box<dyn Future<Output = Result<Vec<RepoInfo>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_user_repos_with_name<'life0, 'life1, 'async_trait>(
&'life0 self,
user_name: &'life1 str,
option: Option<ReposListOptions>,
) -> Pin<Box<dyn Future<Output = Result<Vec<RepoInfo>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sourcefn get_commit_info<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
sha: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<CommitInfo, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn get_commit_info<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
sha: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<CommitInfo, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Sourcefn get_commit_infos<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
option: Option<CommitListOptions>,
) -> Pin<Box<dyn Future<Output = Result<Vec<CommitInfo>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn get_commit_infos<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
option: Option<CommitListOptions>,
) -> Pin<Box<dyn Future<Output = Result<Vec<CommitInfo>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Sourcefn add_repo_collaborator<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
user_name: &'life3 str,
permission: Option<CollaboratorPermission>,
) -> Pin<Box<dyn Future<Output = Result<CollaboratorResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn add_repo_collaborator<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
user_name: &'life3 str,
permission: Option<CollaboratorPermission>,
) -> Pin<Box<dyn Future<Output = Result<CollaboratorResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
添加仓库协作者, 如果仓库属于某个组织下的则为外部协作者
§参数
repo_path- 仓库路径,格式为(owner, repo)user_name- 协作者用户名permission- 协作者权限, 默认为Pull, 可选值为Admin,Push,Pull
Sourcefn create_issue<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
title: &'life3 str,
body: Option<&'life4 str>,
option: Option<CreateIssueOptions>,
) -> Pin<Box<dyn Future<Output = Result<IssueInfo, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
fn create_issue<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
title: &'life3 str,
body: Option<&'life4 str>,
option: Option<CreateIssueOptions>,
) -> Pin<Box<dyn Future<Output = Result<IssueInfo, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
创建一个issue
§参数
repo_path- 仓库路径,格式为(owner, repo)title- issue标题body- issue内容option- 创建issue选项, 详见 CreateIssueOptions
Sourcefn get_issue_info<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
issue_number: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<IssueInfo, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn get_issue_info<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
issue_number: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<IssueInfo, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Sourcefn get_issue_list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
options: Option<IssueListOptions>,
) -> Pin<Box<dyn Future<Output = Result<Vec<IssueInfo>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn get_issue_list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
options: Option<IssueListOptions>,
) -> Pin<Box<dyn Future<Output = Result<Vec<IssueInfo>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Sourcefn update_issue<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
issue_number: &'life3 str,
options: Option<UpdateIssueOptions>,
) -> Pin<Box<dyn Future<Output = Result<IssueInfo, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn update_issue<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
issue_number: &'life3 str,
options: Option<UpdateIssueOptions>,
) -> Pin<Box<dyn Future<Output = Result<IssueInfo, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
更新issue信息
§参数
repo_path- 仓库路径,格式为(owner, repo)issue_number- issue编号options- 更新issue选项, 详见 UpdateIssueOptions