pub trait AccessApi {
// Required methods
fn add_collaborator(
&self,
repo: &RepoRef,
user: &UserName,
permission: Permission,
) -> impl Future<Output = Result<(), ForgeError>> + Send;
fn add_team(
&self,
repo: &RepoRef,
team: &TeamName,
permission: Permission,
) -> impl Future<Output = Result<(), ForgeError>> + Send;
fn collaborators(
&self,
repo: &RepoRef,
) -> impl Future<Output = Result<Vec<Collaborator>, ForgeError>> + Send;
fn current_user(
&self,
) -> impl Future<Output = Result<String, ForgeError>> + Send;
fn organization_teams(
&self,
organization: &str,
) -> impl Future<Output = Result<Vec<Team>, ForgeError>> + Send;
fn remove_collaborator(
&self,
repo: &RepoRef,
user: &str,
) -> impl Future<Output = Result<(), ForgeError>> + Send;
fn remove_team(
&self,
repo: &RepoRef,
team: &str,
) -> impl Future<Output = Result<(), ForgeError>> + Send;
fn teams(
&self,
repo: &RepoRef,
) -> impl Future<Output = Result<Vec<Team>, ForgeError>> + Send;
fn user_teams(
&self,
) -> impl Future<Output = Result<Vec<Team>, ForgeError>> + Send;
}Expand description
The access operations of the Forgejo API.
Required Methods§
Sourcefn add_collaborator(
&self,
repo: &RepoRef,
user: &UserName,
permission: Permission,
) -> impl Future<Output = Result<(), ForgeError>> + Send
fn add_collaborator( &self, repo: &RepoRef, user: &UserName, permission: Permission, ) -> impl Future<Output = Result<(), ForgeError>> + Send
PUT /repos/{owner}/{repo}/collaborators/{collaborator}.
Sourcefn add_team(
&self,
repo: &RepoRef,
team: &TeamName,
permission: Permission,
) -> impl Future<Output = Result<(), ForgeError>> + Send
fn add_team( &self, repo: &RepoRef, team: &TeamName, permission: Permission, ) -> impl Future<Output = Result<(), ForgeError>> + Send
PUT /repos/{owner}/{repo}/teams/{team}.
Sourcefn collaborators(
&self,
repo: &RepoRef,
) -> impl Future<Output = Result<Vec<Collaborator>, ForgeError>> + Send
fn collaborators( &self, repo: &RepoRef, ) -> impl Future<Output = Result<Vec<Collaborator>, ForgeError>> + Send
GET /repos/{owner}/{repo}/collaborators, every page, then
GET /repos/{owner}/{repo}/collaborators/{collaborator}/permission
for each user.
Sourcefn current_user(
&self,
) -> impl Future<Output = Result<String, ForgeError>> + Send
fn current_user( &self, ) -> impl Future<Output = Result<String, ForgeError>> + Send
GET /user, the login of the authenticated user.
Sourcefn organization_teams(
&self,
organization: &str,
) -> impl Future<Output = Result<Vec<Team>, ForgeError>> + Send
fn organization_teams( &self, organization: &str, ) -> impl Future<Output = Result<Vec<Team>, ForgeError>> + Send
GET /orgs/{org}/teams, every page.
Sourcefn remove_collaborator(
&self,
repo: &RepoRef,
user: &str,
) -> impl Future<Output = Result<(), ForgeError>> + Send
fn remove_collaborator( &self, repo: &RepoRef, user: &str, ) -> impl Future<Output = Result<(), ForgeError>> + Send
DELETE /repos/{owner}/{repo}/collaborators/{collaborator}.
Sourcefn remove_team(
&self,
repo: &RepoRef,
team: &str,
) -> impl Future<Output = Result<(), ForgeError>> + Send
fn remove_team( &self, repo: &RepoRef, team: &str, ) -> impl Future<Output = Result<(), ForgeError>> + Send
DELETE /repos/{owner}/{repo}/teams/{team}.
Sourcefn teams(
&self,
repo: &RepoRef,
) -> impl Future<Output = Result<Vec<Team>, ForgeError>> + Send
fn teams( &self, repo: &RepoRef, ) -> impl Future<Output = Result<Vec<Team>, ForgeError>> + Send
GET /repos/{owner}/{repo}/teams.
Sourcefn user_teams(
&self,
) -> impl Future<Output = Result<Vec<Team>, ForgeError>> + Send
fn user_teams( &self, ) -> impl Future<Output = Result<Vec<Team>, ForgeError>> + Send
GET /user/teams, every page.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".