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
70
71
72
73
74
75
use std::ops::{Add, AddAssign};
use std::{borrow::Cow, collections::HashMap};
mod resolved;
pub use resolved::*;
mod section;
pub use section::*;
mod value;
pub use value::*;
#[derive(PartialEq, Eq, Hash, PartialOrd, Ord, Debug, Clone, Copy)]
pub(crate) struct Index(pub(crate) usize);
impl Add<Size> for Index {
type Output = Self;
fn add(self, rhs: Size) -> Self::Output {
Self(self.0 + rhs.0)
}
}
#[derive(PartialEq, Eq, Hash, PartialOrd, Ord, Debug, Clone, Copy)]
pub(crate) struct Size(pub(crate) usize);
impl AddAssign<usize> for Size {
fn add_assign(&mut self, rhs: usize) {
self.0 += rhs;
}
}
#[derive(PartialEq, Eq, Hash, Copy, Clone, PartialOrd, Ord, Debug)]
pub(crate) struct SectionId(pub(crate) usize);
#[derive(PartialEq, Eq, Clone, Debug)]
pub(crate) enum LookupTreeNode<'a> {
Terminal(Vec<SectionId>),
NonTerminal(HashMap<Cow<'a, str>, Vec<SectionId>>),
}
pub mod from_env;
mod resolve_includes;
pub(crate) use resolve_includes::resolve_includes;
pub mod from_paths;
mod access;
mod impls;
mod init;
mod utils;
#[cfg(test)]
mod try_from_str_tests;