pub trait ReleaseProvider:
Debug
+ Send
+ Sync {
// Required methods
fn create<'life0, 'async_trait>(
&'life0 self,
args: CreateReleaseArgs,
) -> Pin<Box<dyn Future<Output = Result<ReleaseData>> + 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<ReleaseData>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn view<'life0, 'life1, 'async_trait>(
&'life0 self,
tag_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ReleaseData>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn edit<'life0, 'life1, 'async_trait>(
&'life0 self,
tag_name: &'life1 str,
args: CreateReleaseArgs,
) -> Pin<Box<dyn Future<Output = Result<ReleaseData>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn upload_asset<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tag_name: &'life1 str,
file_path: &'life2 str,
asset_name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn download_asset<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tag_name: &'life1 str,
asset_name: &'life2 str,
dest_path: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
tag_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: CreateReleaseArgs,
) -> Pin<Box<dyn Future<Output = Result<ReleaseData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create<'life0, 'async_trait>(
&'life0 self,
args: CreateReleaseArgs,
) -> Pin<Box<dyn Future<Output = Result<ReleaseData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn list<'life0, 'async_trait>(
&'life0 self,
limit: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<Paged<ReleaseData>>> + 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<ReleaseData>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
列出仓库的 Release。
limit 为 None 时取至 crate::paging::DEFAULT_LIST_LIMIT。
返回的 Paged 携带截断标志。
§Errors
当平台 API 调用失败时返回错误。
Sourcefn view<'life0, 'life1, 'async_trait>(
&'life0 self,
tag_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ReleaseData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn view<'life0, 'life1, 'async_trait>(
&'life0 self,
tag_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ReleaseData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn edit<'life0, 'life1, 'async_trait>(
&'life0 self,
tag_name: &'life1 str,
args: CreateReleaseArgs,
) -> Pin<Box<dyn Future<Output = Result<ReleaseData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn edit<'life0, 'life1, 'async_trait>(
&'life0 self,
tag_name: &'life1 str,
args: CreateReleaseArgs,
) -> Pin<Box<dyn Future<Output = Result<ReleaseData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn upload_asset<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tag_name: &'life1 str,
file_path: &'life2 str,
asset_name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn upload_asset<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tag_name: &'life1 str,
file_path: &'life2 str,
asset_name: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
上传资源文件到指定 Release。
file_path 为本地文件路径,asset_name 为在 Release
中显示的资源名。
§Errors
当 Release 不存在、文件读取失败或平台 API 调用失败时返回错误。
Sourcefn download_asset<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tag_name: &'life1 str,
asset_name: &'life2 str,
dest_path: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn download_asset<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tag_name: &'life1 str,
asset_name: &'life2 str,
dest_path: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".