1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//! # Downloaders
//!
//! This module contains the core logic for all file downloading operations.
//! It is designed to be highly modular and extensible, allowing for the
//! integration of various download sources, such as official Minecraft,
//! CurseForge, and Modrinth.
//!
//! The central component is the `FileDownloader` trait, which defines the
//! contract for any object that can handle a download. This allows different
//! downloader implementations to be used interchangeably.
//!
//! The module provides the following specific downloader implementations:
//!
//! * [`CurseDownloader`]: For downloading modpacks from CurseForge.
//! * [`RinthDownloader`]: For downloading modpacks from Modrinth.
//! * [`RuntimeDownloader`]: Specifically for downloading Java runtimes.
//! * [`MinecraftDownloader`]: For handling the complex process of
//! downloading Minecraft versions, assets, and libraries.
//!
//! ## Examples
//!
//! The following example demonstrates how to use the `MinecraftDownloader`
//! to download a specific version of Minecraft.
//!
//! ```no_run
//! use uranium_rs::downloaders::{FileDownloader, Downloader, MinecraftDownloader, MinecraftDownloadState};
//! use uranium_rs::error::Result;
//!
//! #[tokio::main]
//! async fn main() -> Result<()> {
//! let mut minecraft_down = MinecraftDownloader::<Downloader>::init(
//! "path/to/my/minecraft_instance",
//! "1.20.1"
//! ).await?;
//!
//! loop {
//! let state = minecraft_down.progress().await?;
//!
//! match state {
//! MinecraftDownloadState::Completed => {
//! println!("Installation completed!");
//! break;
//! },
//! _ => {
//! println!("Current state: {:?}", state);
//! }
//! }
//! }
//!
//! Ok(())
//! }
//! ```
pub use CurseDownloader;
pub use ;
pub use ;
pub use RinthDownloader;
pub use RuntimeDownloader;
pub use update_modpack;