pub trait RulesetsApi {
// Required methods
fn create_ruleset(
&self,
repository: &RepoRef,
name: &str,
ruleset: &Definition,
) -> impl Future<Output = Result<(), ForgeError>> + Send;
fn delete_ruleset(
&self,
repository: &RepoRef,
id: u64,
) -> impl Future<Output = Result<(), ForgeError>> + Send;
fn rulesets(
&self,
repository: &RepoRef,
) -> impl Future<Output = Result<Vec<Ruleset>, ForgeError>> + Send;
fn update_ruleset(
&self,
repository: &RepoRef,
id: u64,
name: &str,
ruleset: &Definition,
unmanaged_rules: &[Value],
) -> impl Future<Output = Result<(), ForgeError>> + Send;
}Expand description
The rulesets operations of the GitHub API.
Required Methods§
Sourcefn create_ruleset(
&self,
repository: &RepoRef,
name: &str,
ruleset: &Definition,
) -> impl Future<Output = Result<(), ForgeError>> + Send
fn create_ruleset( &self, repository: &RepoRef, name: &str, ruleset: &Definition, ) -> impl Future<Output = Result<(), ForgeError>> + Send
Create a ruleset with its complete desired configuration.
Sourcefn delete_ruleset(
&self,
repository: &RepoRef,
id: u64,
) -> impl Future<Output = Result<(), ForgeError>> + Send
fn delete_ruleset( &self, repository: &RepoRef, id: u64, ) -> impl Future<Output = Result<(), ForgeError>> + Send
Delete the ruleset id.
Sourcefn rulesets(
&self,
repository: &RepoRef,
) -> impl Future<Output = Result<Vec<Ruleset>, ForgeError>> + Send
fn rulesets( &self, repository: &RepoRef, ) -> impl Future<Output = Result<Vec<Ruleset>, ForgeError>> + Send
Read the repository’s current rulesets.
Sourcefn update_ruleset(
&self,
repository: &RepoRef,
id: u64,
name: &str,
ruleset: &Definition,
unmanaged_rules: &[Value],
) -> impl Future<Output = Result<(), ForgeError>> + Send
fn update_ruleset( &self, repository: &RepoRef, id: u64, name: &str, ruleset: &Definition, unmanaged_rules: &[Value], ) -> impl Future<Output = Result<(), ForgeError>> + Send
Replace the ruleset id with its complete desired configuration and
the live rules that the configuration cannot declare.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".