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
use serde::{Deserialize, Serialize};
#[derive(Debug, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct BuildTargetCapabilities {
can_compile: bool,
can_test: bool,
can_run: bool,
can_debug: bool,
}
impl BuildTargetCapabilities {
pub fn new(can_compile: bool, can_test: bool, can_run: bool, can_debug: bool) -> Self {
Self {
can_compile,
can_test,
can_run,
can_debug,
}
}
pub fn set_can_compile(&mut self, can_compile: bool) {
self.can_compile = can_compile;
}
pub fn can_compile(&self) -> bool {
self.can_compile
}
pub fn set_can_test(&mut self, can_test: bool) {
self.can_test = can_test;
}
pub fn can_test(&self) -> bool {
self.can_test
}
pub fn set_can_run(&mut self, can_run: bool) {
self.can_run = can_run;
}
pub fn can_run(&self) -> bool {
self.can_run
}
pub fn set_can_debug(&mut self, can_debug: bool) {
self.can_debug = can_debug;
}
pub fn can_debug(&self) -> bool {
self.can_debug
}
}