pub trait Client: Send + Sync {
// Required methods
fn set_token(&mut self, token: &str) -> Result<(), CoreError>;
fn set_proxy(&mut self, proxy: &str) -> Result<(), CoreError>;
fn get_user_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<UserInfo, CoreError>> + 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, CoreError>> + 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, CoreError>> + 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, CoreError>> + 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, CoreError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn get_default_branch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo_path: (&'life1 str, &'life2 str),
use_token: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<String, CoreError>> + 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>, CoreError>> + 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>, CoreError>> + 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, CoreError>> + 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, CoreError>> + 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, CoreError>> + 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, CoreError>> + 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, CoreError>> + 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, CoreError>> + 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, CoreError>> + 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, CoreError>> + 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, CoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
获取指定用户贡献数据