pub trait LabelProvider:
Debug
+ Send
+ Sync {
// Required methods
fn create<'life0, 'async_trait>(
&'life0 self,
args: CreateLabelArgs,
) -> Pin<Box<dyn Future<Output = Result<LabelData>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list<'life0, 'async_trait>(
&'life0 self,
limit: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<Paged<LabelData>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn edit<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
args: CreateLabelArgs,
) -> Pin<Box<dyn Future<Output = Result<LabelData>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Required Methods§
Sourcefn create<'life0, 'async_trait>(
&'life0 self,
args: CreateLabelArgs,
) -> Pin<Box<dyn Future<Output = Result<LabelData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create<'life0, 'async_trait>(
&'life0 self,
args: CreateLabelArgs,
) -> Pin<Box<dyn Future<Output = Result<LabelData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create a new label in the repository.
§Errors
Returns an error if the platform API call fails, the label name already exists, or the parameters are invalid.
Sourcefn list<'life0, 'async_trait>(
&'life0 self,
limit: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<Paged<LabelData>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self,
limit: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<Paged<LabelData>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List all labels in the repository.
limit 为 None 时取至 crate::paging::DEFAULT_LIST_LIMIT。
§Errors
Returns an error if the platform API call fails.
Sourcefn edit<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
args: CreateLabelArgs,
) -> Pin<Box<dyn Future<Output = Result<LabelData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn edit<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
args: CreateLabelArgs,
) -> Pin<Box<dyn Future<Output = Result<LabelData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Edit an existing label by name.
§Errors
Returns an error if the label does not exist or the platform API call fails.
Sourcefn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a label by name.
§Errors
Returns an error if the label does not exist or the platform API call fails.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".