Skip to main content

LabelsApi

Trait LabelsApi 

Source
pub trait LabelsApi {
    // Required methods
    fn create_label(
        &self,
        repo: &RepoRef,
        body: &CreateLabelOption,
    ) -> impl Future<Output = Result<(), ForgeError>> + Send;
    fn delete_label(
        &self,
        repo: &RepoRef,
        id: i64,
    ) -> impl Future<Output = Result<(), ForgeError>> + Send;
    fn labels(
        &self,
        repo: &RepoRef,
    ) -> impl Future<Output = Result<Vec<Label>, ForgeError>> + Send;
    fn patch_label(
        &self,
        repo: &RepoRef,
        id: i64,
        body: &EditLabelOption,
    ) -> impl Future<Output = Result<(), ForgeError>> + Send;
}
Expand description

The label operations of the Forgejo API.

Required Methods§

Source

fn create_label( &self, repo: &RepoRef, body: &CreateLabelOption, ) -> impl Future<Output = Result<(), ForgeError>> + Send

POST /repos/{owner}/{repo}/labels.

Source

fn delete_label( &self, repo: &RepoRef, id: i64, ) -> impl Future<Output = Result<(), ForgeError>> + Send

DELETE /repos/{owner}/{repo}/labels/{id}.

Source

fn labels( &self, repo: &RepoRef, ) -> impl Future<Output = Result<Vec<Label>, ForgeError>> + Send

GET /repos/{owner}/{repo}/labels, every page.

Source

fn patch_label( &self, repo: &RepoRef, id: i64, body: &EditLabelOption, ) -> impl Future<Output = Result<(), ForgeError>> + Send

PATCH /repos/{owner}/{repo}/labels/{id}.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§