pub trait MilestoneProvider:
Debug
+ Send
+ Sync {
// Required methods
fn create<'life0, 'async_trait>(
&'life0 self,
args: CreateMilestoneArgs,
) -> Pin<Box<dyn Future<Output = Result<MilestoneData>> + 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<MilestoneData>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn edit<'life0, 'async_trait>(
&'life0 self,
number: u64,
args: CreateMilestoneArgs,
) -> Pin<Box<dyn Future<Output = Result<MilestoneData>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn close<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<MilestoneData>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn reopen<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<MilestoneData>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Required Methods§
Sourcefn create<'life0, 'async_trait>(
&'life0 self,
args: CreateMilestoneArgs,
) -> Pin<Box<dyn Future<Output = Result<MilestoneData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create<'life0, 'async_trait>(
&'life0 self,
args: CreateMilestoneArgs,
) -> Pin<Box<dyn Future<Output = Result<MilestoneData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create a new milestone.
§Errors
Returns an error if the platform API call fails or the parameters are invalid.
Sourcefn list<'life0, 'async_trait>(
&'life0 self,
limit: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<Paged<MilestoneData>>> + 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<MilestoneData>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List all milestones in the repository.
limit 为 None 时取至 crate::paging::DEFAULT_LIST_LIMIT。
§Errors
Returns an error if the platform API call fails.
Sourcefn edit<'life0, 'async_trait>(
&'life0 self,
number: u64,
args: CreateMilestoneArgs,
) -> Pin<Box<dyn Future<Output = Result<MilestoneData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn edit<'life0, 'async_trait>(
&'life0 self,
number: u64,
args: CreateMilestoneArgs,
) -> Pin<Box<dyn Future<Output = Result<MilestoneData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Edit an existing milestone by number.
§Errors
Returns an error if the milestone does not exist or the platform API call fails.
Sourcefn close<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<MilestoneData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<MilestoneData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Close a milestone by number.
§Errors
Returns an error if the milestone does not exist or the platform API call fails.
Sourcefn reopen<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<MilestoneData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reopen<'life0, 'async_trait>(
&'life0 self,
number: u64,
) -> Pin<Box<dyn Future<Output = Result<MilestoneData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Reopen a closed milestone by number.
§Errors
Returns an error if the milestone 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".