aboutsummaryrefslogtreecommitdiff
path: root/src/config/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config/mod.rs')
-rw-r--r--src/config/mod.rs97
1 files changed, 0 insertions, 97 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs
deleted file mode 100644
index 98ba9fb..0000000
--- a/src/config/mod.rs
+++ /dev/null
@@ -1,97 +0,0 @@
1mod parse;
2
3use std::path::Path;
4
5pub struct Config {
6 groups: Vec<Group>,
7}
8
9pub struct Group {
10 includes: Vec<IncludeAction>,
11 links: Vec<LinkAction>,
12 copies: Vec<CopyAction>,
13}
14
15pub struct IncludeAction {
16 group: String,
17}
18
19pub struct LinkAction {
20 source: String,
21 target: String,
22}
23
24pub struct CopyAction {
25 source: String,
26 target: String,
27}
28
29pub fn parse(content: &str) -> std::io::Result<Config> {
30 todo!()
31}
32
33pub fn parse_path(path: impl AsRef<Path>) -> std::io::Result<Config> {
34 todo!()
35}
36
37pub fn format(content: &str) -> std::io::Result<String> {
38 todo!()
39}
40
41pub fn format_path(path: impl AsRef<Path>) -> std::io::Result<String> {
42 todo!()
43}
44
45pub fn format_inplace(path: impl AsRef<Path>) -> std::io::Result<()> {
46 todo!()
47}
48
49impl Config {
50 pub fn groups(&self) -> impl Iterator<Item = &Group> {
51 std::iter::empty()
52 }
53
54 pub fn group(&self, name: &str) -> Option<&Group> {
55 todo!()
56 }
57}
58
59impl Group {
60 pub fn groups(&self) -> impl Iterator<Item = &IncludeAction> {
61 std::iter::empty()
62 }
63
64 pub fn links(&self) -> impl Iterator<Item = &LinkAction> {
65 std::iter::empty()
66 }
67
68 pub fn copies(&self) -> impl Iterator<Item = &CopyAction> {
69 std::iter::empty()
70 }
71}
72
73impl IncludeAction {
74 pub fn name(&self) -> &str {
75 todo!()
76 }
77}
78
79impl LinkAction {
80 pub fn source(&self) -> &str {
81 todo!()
82 }
83
84 pub fn dest(&self) -> &str {
85 todo!()
86 }
87}
88
89impl CopyAction {
90 pub fn source(&self) -> &str {
91 todo!()
92 }
93
94 pub fn dest(&self) -> &str {
95 todo!()
96 }
97}