diff options
Diffstat (limited to 'src/launcher.rs')
| -rw-r--r-- | src/launcher.rs | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/launcher.rs b/src/launcher.rs index 70c313c..06a5d5b 100644 --- a/src/launcher.rs +++ b/src/launcher.rs @@ -1,18 +1,31 @@ mod constants;
mod version;
-mod instance;
mod profile;
+mod strsub;
-use std::error::Error;
+use std::collections::HashMap;
+use serde::{Deserialize, Serialize};
use version::VersionList;
+use crate::launcher::profile::{Instance, Profile};
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct Settings {
+ profiles: HashMap<String, Profile>,
+ instances: HashMap<String, Instance>
+}
pub struct Launcher {
- pub versions: VersionList
-
+ versions: VersionList,
+ settings: Settings,
}
impl Launcher {
- pub async fn new() -> Result<Launcher, Box<dyn Error>> {
- todo!()
+ pub fn new(versions: VersionList, settings: Settings) -> Launcher {
+ Launcher {
+ versions,
+ settings
+ }
}
+
+
}
\ No newline at end of file |
