pub trait VanillaDownloadExt: Sync {
    // Required methods
    fn get_avaliable_vanilla_versions<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<VersionManifest>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn download_vanilla_jar<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        path: &'life1 str,
        save_path: &'life2 str,
        sha1: &'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_library<'life0, 'life1, 'async_trait>(
        &'life0 self,
        sha1: String,
        path: String,
        save_path: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn download_libraries<'life0, 'life1, 'async_trait>(
        &'life0 self,
        libraries: &'life1 [Library]
    ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, Vec<String>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn download_asset_index<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
        url: &'life2 str,
        save_path: &'life3 str
    ) -> Pin<Box<dyn Future<Output = Result<AssetIndexes>> + 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,
        sha1: &'life1 str,
        name: &'life2 str,
        save_path: &'life3 str,
        is_pre: bool,
        r: Option<impl 'async_trait + Reporter>
    ) -> 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_vanilla<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        version_name: &'life1 str,
        version_meta: &'life2 VersionMeta,
        is_repair: bool
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn install_vanilla<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        version_name: &'life1 str,
        version_info: &'life2 VersionInfo
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

一个用于下载安装原版的扩展特质,可以使用 crate::download::Downloader 来安装

Required Methods§

source

fn get_avaliable_vanilla_versions<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<VersionManifest>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

获取现在所有可下载版本

source

fn download_vanilla_jar<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, path: &'life1 str, save_path: &'life2 str, sha1: &'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,

下载原版客户端 JAR 文件

source

fn download_library<'life0, 'life1, 'async_trait>( &'life0 self, sha1: String, path: String, save_path: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

下载一个依赖库,并存放到指定位置

source

fn download_libraries<'life0, 'life1, 'async_trait>( &'life0 self, libraries: &'life1 [Library] ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, Vec<String>>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

下载一组依赖库,安装位置由特质实现而定

source

fn download_asset_index<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, name: &'life1 str, url: &'life2 str, save_path: &'life3 str ) -> Pin<Box<dyn Future<Output = Result<AssetIndexes>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

下载游戏资源索引

source

fn download_asset<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, sha1: &'life1 str, name: &'life2 str, save_path: &'life3 str, is_pre: bool, r: Option<impl 'async_trait + Reporter> ) -> 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,

下载一个游戏素材,并存放到指定位置

source

fn download_vanilla<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, version_name: &'life1 str, version_meta: &'life2 VersionMeta, is_repair: bool ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

下载一个游戏版本

source

fn install_vanilla<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, version_name: &'life1 str, version_info: &'life2 VersionInfo ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

安装一个游戏版本

Implementors§