bsp_types/
bt_capabilities.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Default, Serialize, Deserialize)]
5#[serde(rename_all = "camelCase")]
6pub struct BuildTargetCapabilities {
7 can_compile: bool,
9
10 can_test: bool,
12
13 can_run: bool,
15
16 can_debug: bool,
18}
19
20impl BuildTargetCapabilities {
21 pub fn new(can_compile: bool, can_test: bool, can_run: bool, can_debug: bool) -> Self {
22 Self {
23 can_compile,
24 can_test,
25 can_run,
26 can_debug,
27 }
28 }
29
30 pub fn set_can_compile(&mut self, can_compile: bool) {
32 self.can_compile = can_compile;
33 }
34
35 pub fn can_compile(&self) -> bool {
37 self.can_compile
38 }
39
40 pub fn set_can_test(&mut self, can_test: bool) {
42 self.can_test = can_test;
43 }
44
45 pub fn can_test(&self) -> bool {
47 self.can_test
48 }
49
50 pub fn set_can_run(&mut self, can_run: bool) {
52 self.can_run = can_run;
53 }
54
55 pub fn can_run(&self) -> bool {
57 self.can_run
58 }
59
60 pub fn set_can_debug(&mut self, can_debug: bool) {
62 self.can_debug = can_debug;
63 }
64
65 pub fn can_debug(&self) -> bool {
67 self.can_debug
68 }
69}