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
use dev_prefix::*;
pub use core::prefix::*;
pub use std::rc::Rc;
#[derive(Debug, Default, Clone, PartialEq, Eq)]
pub struct FmtSettings {
pub long: bool,
pub recurse: u8,
pub path: bool,
pub parts: bool,
pub partof: bool,
pub loc_path: bool,
pub text: bool,
pub color: bool,
}
impl FmtSettings {
pub fn is_empty(&self) -> bool {
!self.long && !self.path && !self.parts && !self.partof && !self.loc_path && !self.text
}
}
#[derive(Debug, Default)]
pub struct FmtArtifact {
pub long: bool,
pub path: Option<PathBuf>,
pub parts: Option<Vec<FmtArtifact>>,
pub partof: Option<Vec<FmtArtifact>>,
pub done: Option<String>,
pub text: Option<String>,
pub name: ArtNameRc,
}
#[derive(Debug, PartialEq, Eq)]
pub struct PercentSearch {
pub lt: bool,
pub perc: i8,
}
impl Default for PercentSearch {
fn default() -> PercentSearch {
PercentSearch {
lt: false,
perc: -127,
}
}
}
#[derive(Debug, Default, PartialEq, Eq)]
pub struct SearchSettings {
pub use_regex: bool,
pub name: bool,
pub path: bool,
pub parts: bool,
pub partof: bool,
pub loc: bool,
pub text: bool,
pub completed: PercentSearch,
pub tested: PercentSearch,
}