summaryrefslogtreecommitdiff
path: root/src/data/list.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/list.rs')
-rw-r--r--src/data/list.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/data/list.rs b/src/data/list.rs
new file mode 100644
index 0000000..0045b7a
--- /dev/null
+++ b/src/data/list.rs
@@ -0,0 +1,19 @@
1use crate::{config::Cfg, db::{config_get_current_list, lists_get}, error::MLE};
2
3use super::modloader::Modloader;
4
5#[derive(Debug, Clone, PartialEq, Eq)]
6pub struct List {
7 pub id: String,
8 pub mc_version: String,
9 pub modloader: Modloader,
10 pub download_folder: String,
11}
12
13impl List {
14 /// # Errors
15 pub fn get_current_list(config: &Cfg) -> MLE<List> {
16 let id = config_get_current_list(config)?;
17 lists_get(config, &id)
18 }
19}