Base protocol refactor complete
parent: tbd commit: 079d544
1 | use ; |
2 | |
3 | use ; |
4 | use Value; |
5 | use Error; |
6 | |
7 | use crate:: |
8 | , | Setting
9 | , |
10 | ; |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | // #[derive(Serialize, Deserialize)] |
17 | // pub struct GetRequest<V: GiteratedObjectValue> { |
18 | // value_name: String, |
19 | // _marker: PhantomData<V>, |
20 | // } |
21 | |
22 | // impl<O: GiteratedObject, V: GiteratedObjectValue<Object = O> + Send> GiteratedOperation<O> |
23 | // for GetRequest<V> |
24 | // { |
25 | // type Success = V; |
26 | |
27 | // type Failure = GetValueError; |
28 | // } |
29 | |
30 | // #[derive(Error, Debug, Serialize, Deserialize)] |
31 | // pub enum GetValueError {} |
32 | |
33 | |
34 | |
35 | pub setting_name: String, |
36 | pub _marker: , |
37 | |
38 | |
39 | |
40 | for GetSetting |
41 | |
42 | |
43 | "get_setting" |
44 | |
45 | |
46 | type Success = S; |
47 | |
48 | type Failure = GetSettingError; |
49 | |
50 | |
51 | |
52 | |
53 | |
54 | |
55 | |
56 | pub setting_name: String, |
57 | pub value: S, |
58 | |
59 | |
60 | |
61 | |
62 | "set_setting" |
63 | |
64 | |
65 | type Success = ; |
66 | |
67 | type Failure = SetSettingError; |
68 | |
69 | |
70 | |
71 | |
72 | |
73 | |
74 | |
75 | |
76 | value: Value, |
77 | #[serde(skip)] |
78 | _marker: , |
79 | |
80 | |
81 | |
82 | pub unsafe |
83 | Self |
84 | value, |
85 | _marker: Default default, |
86 | |
87 | |
88 | |
89 | |
90 | |
91 | type Object = O; |
92 | |
93 | |
94 | todo! |
95 | |
96 | |
97 |