pub trait EnvironmentsApi {
// Required methods
fn branch_policies(
&self,
repository: &RepoRef,
environment: &str,
) -> impl Future<Output = Result<Vec<BranchPolicy>, ForgeError>> + Send;
fn create_branch_policy(
&self,
repository: &RepoRef,
environment: &str,
policy: &Policy,
) -> impl Future<Output = Result<(), ForgeError>> + Send;
fn delete_branch_policy(
&self,
repository: &RepoRef,
environment: &str,
id: u64,
) -> impl Future<Output = Result<(), ForgeError>> + Send;
fn delete_environment(
&self,
repository: &RepoRef,
environment: &str,
) -> impl Future<Output = Result<(), ForgeError>> + Send;
fn environments(
&self,
repository: &RepoRef,
) -> impl Future<Output = Result<Vec<Environment>, ForgeError>> + Send;
fn put_environment(
&self,
repository: &RepoRef,
environment: &str,
settings: &EnvironmentBody,
) -> impl Future<Output = Result<(), ForgeError>> + Send;
}Expand description
The environments operations of the GitHub API.
Required Methods§
Sourcefn branch_policies(
&self,
repository: &RepoRef,
environment: &str,
) -> impl Future<Output = Result<Vec<BranchPolicy>, ForgeError>> + Send
fn branch_policies( &self, repository: &RepoRef, environment: &str, ) -> impl Future<Output = Result<Vec<BranchPolicy>, ForgeError>> + Send
Read the branch policies of environment.
Sourcefn create_branch_policy(
&self,
repository: &RepoRef,
environment: &str,
policy: &Policy,
) -> impl Future<Output = Result<(), ForgeError>> + Send
fn create_branch_policy( &self, repository: &RepoRef, environment: &str, policy: &Policy, ) -> impl Future<Output = Result<(), ForgeError>> + Send
Add a branch policy to environment.
Sourcefn delete_branch_policy(
&self,
repository: &RepoRef,
environment: &str,
id: u64,
) -> impl Future<Output = Result<(), ForgeError>> + Send
fn delete_branch_policy( &self, repository: &RepoRef, environment: &str, id: u64, ) -> impl Future<Output = Result<(), ForgeError>> + Send
Remove the branch policy id from environment.
Sourcefn delete_environment(
&self,
repository: &RepoRef,
environment: &str,
) -> impl Future<Output = Result<(), ForgeError>> + Send
fn delete_environment( &self, repository: &RepoRef, environment: &str, ) -> impl Future<Output = Result<(), ForgeError>> + Send
Delete environment.
Sourcefn environments(
&self,
repository: &RepoRef,
) -> impl Future<Output = Result<Vec<Environment>, ForgeError>> + Send
fn environments( &self, repository: &RepoRef, ) -> impl Future<Output = Result<Vec<Environment>, ForgeError>> + Send
Read the repository’s environments, without their branch policies.
Sourcefn put_environment(
&self,
repository: &RepoRef,
environment: &str,
settings: &EnvironmentBody,
) -> impl Future<Output = Result<(), ForgeError>> + Send
fn put_environment( &self, repository: &RepoRef, environment: &str, settings: &EnvironmentBody, ) -> impl Future<Output = Result<(), ForgeError>> + Send
Create environment or replace its settings.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".