pub trait PlatformClient {
// Required methods
fn create_repo(
&self,
name: &str,
description: Option<&str>,
visibility: Visibility,
namespace: Option<&str>,
) -> Result<RemoteRepo>;
fn delete_repo(&self, owner: &str, repo: &str) -> Result<()>;
fn update_repo(
&self,
owner: &str,
repo: &str,
settings: RepoSettings,
) -> Result<RemoteRepo>;
fn get_repo(&self, owner: &str, repo: &str) -> Result<RemoteRepo>;
fn list_repos(&self) -> Result<Vec<RemoteRepo>>;
fn set_visibility(
&self,
owner: &str,
repo: &str,
visibility: Visibility,
) -> Result<()>;
fn configure_features(
&self,
owner: &str,
repo: &str,
features: RepoFeatures,
) -> Result<()>;
}Expand description
Platform-specific API client trait
Required Methods§
Sourcefn create_repo(
&self,
name: &str,
description: Option<&str>,
visibility: Visibility,
namespace: Option<&str>,
) -> Result<RemoteRepo>
fn create_repo( &self, name: &str, description: Option<&str>, visibility: Visibility, namespace: Option<&str>, ) -> Result<RemoteRepo>
Create a new repository
Create a repository.
namespace: None → authenticated user’s personal account.
Some(owner) → organization (GitHub/Gitea/Forgejo/Codeberg) or
group/subgroup path (GitLab).
Sourcefn update_repo(
&self,
owner: &str,
repo: &str,
settings: RepoSettings,
) -> Result<RemoteRepo>
fn update_repo( &self, owner: &str, repo: &str, settings: RepoSettings, ) -> Result<RemoteRepo>
Update repository settings
Sourcefn list_repos(&self) -> Result<Vec<RemoteRepo>>
fn list_repos(&self) -> Result<Vec<RemoteRepo>>
List user repositories
Sourcefn set_visibility(
&self,
owner: &str,
repo: &str,
visibility: Visibility,
) -> Result<()>
fn set_visibility( &self, owner: &str, repo: &str, visibility: Visibility, ) -> Result<()>
Set repository visibility
Sourcefn configure_features(
&self,
owner: &str,
repo: &str,
features: RepoFeatures,
) -> Result<()>
fn configure_features( &self, owner: &str, repo: &str, features: RepoFeatures, ) -> Result<()>
Enable/disable features
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".