Giterated Stack `ObjectValue` and `Setting` refactor.
This refactor adds value and setting update events, as well as value getters. Additionally, the stack is now the owner of the ability to write settings into storage. This is accomplished with the `MetadataProvider` trait. This sets up the ground work for push federation, cache, and basically everything else. commit 7befc583cb3e0c6719506c550ed66ac76293413c Author: Amber <[email protected]> Date: Fri Sep 29 15:46:48 2023 -0500 Finish value and settings refactor in the stack. commit 3ac09994a0caafd1a0b95d9a781c7f202f20e75b Author: Amber <[email protected]> Date: Fri Sep 29 09:46:32 2023 -0500 Add set_setting handling back in commit 84fd31e3eae85d98fa68a28b333dbb32cde3bdb8 Author: Amber <[email protected]> Date: Wed Sep 27 06:36:31 2023 -0500 Remove some allocations from meta types commit 16c310ce3680c4a14ed35083b6a230aaecd43152 Author: Amber <[email protected]> Date: Wed Sep 27 05:35:03 2023 -0500 Add cargo metadata commit eb2520a20001bac7b21c6c3d34f62db32f0ada80 Author: Amber <[email protected]> Date: Wed Sep 27 05:26:27 2023 -0500 Refactor setting and value management to use the unified stack. Allows for tight management, inspection, and eventing of setting and value management. commit 901fe103da0fce4b40f33b0a8b64404049ae03cf Author: Amber <[email protected]> Date: Wed Sep 27 02:38:33 2023 -0500 Set up ground work for value / settings refactor
parent: tbd commit: c377e4d
1 | use ; |
2 | |
3 | use ; |
4 | use |
5 | , | GiteratedObject
6 | , | GiteratedOperation
7 | , | Setting
8 | , |
9 | ; |
10 | use Value; |
11 | |
12 | use crate::; |
13 | |
14 | |
15 | pub name: String, |
16 | pub deserialize: fn , |
17 | pub serialize: fn , |
18 | pub typed_get: fn , |
19 | pub is_get_value_typed: fn , |
20 | |
21 | |
22 | |
23 | ; |
24 | ; |
25 | ; |
26 | ; |
27 | ; |
28 | |
29 | |
30 | |
31 | |
32 | to_string | value_name .
33 | |
34 | |
35 | |
36 | Ok |
37 | |
38 | |
39 | |
40 | let value = value. .unwrap; |
41 | |
42 | to_vec |
43 | |
44 | |
45 | |
46 | Box new |
47 | value_name: value_name .to_string, |
48 | ty: Default default, |
49 | |
50 | |
51 | |
52 | |
53 | typed_get_value. |
54 | |
55 | |
56 | |
57 | |
58 | |
59 | Self |
60 | name: name, |
61 | deserialize: deserialize, |
62 | serialize: serialize, |
63 | typed_get: typed_get, |
64 | is_get_value_typed: is_get_value_typed, |
65 | |
66 | |
67 | |
68 | |
69 | |
70 | pub name: String, |
71 | pub object_kind: String, |
72 | pub deserialize: fn , |
73 | pub any_is_same: fn , |
74 | pub serialize_success: fn , |
75 | pub serialize_error: fn , |
76 | |
77 | |
78 | |
79 | ; |
80 | ; |
81 | ; |
82 | ; |
83 | ; |
84 | |
85 | |
86 | |
87 | |
88 | : 'static, | Failure
89 | : 'static, | Success
90 | O: GiteratedObject, |
91 | D: + 'static, |
92 | |
93 | |
94 | to_string | operation_name .
95 | |
96 | |
97 | |
98 | Ok |
99 | |
100 | |
101 | |
102 | let to_serialize = success. .unwrap; |
103 | to_vec |
104 | |
105 | |
106 | |
107 | let to_serialize = failure. .unwrap; |
108 | to_vec |
109 | |
110 | |
111 | |
112 | other. |
113 | |
114 | |
115 | |
116 | |
117 | |
118 | Self |
119 | name: name, |
120 | deserialize: deserialize, |
121 | serialize_success: serialize_success, |
122 | serialize_error: serialize_failure, |
123 | object_kind: object_name .to_string, |
124 | any_is_same: any_is_same, |
125 | |
126 | |
127 | |
128 | |
129 | |
130 | pub name: String, |
131 | pub from_str: , |
132 | pub any_is_same: fn , |
133 | |
134 | |
135 | |
136 | ; |
137 | ; |
138 | |
139 | |
140 | |
141 | |
142 | to_string | object_name .
143 | |
144 | |
145 | |
146 | other. |
147 | |
148 | |
149 | |
150 | |
151 | |
152 | Self |
153 | name: name, |
154 | from_str: Box new |
155 | let object = from_str .map_err?; |
156 | |
157 | Ok |
158 | , |
159 | any_is_same: any_is_same, |
160 | |
161 | |
162 | |
163 | |
164 | |
165 | pub name: String, |
166 | pub deserialize: fn , |
167 | pub serialize: fn , |
168 | pub setting_updated: fn |
169 | , |
170 | , |
171 | , |
172 | &StackOperationState, |
173 | , |
174 | |
175 | |
176 | |
177 | ; |
178 | ; |
179 | ; |
180 | |
181 | object: , |
182 | setting: , |
183 | stack: , |
184 | operation_state: &StackOperationState, |
185 | ; |
186 | |
187 | |
188 | |
189 | |
190 | to_string | name .
191 | |
192 | |
193 | |
194 | Ok |
195 | |
196 | |
197 | |
198 | to_value |
199 | |
200 | |
201 | |
202 | object: , |
203 | setting: , |
204 | stack: , |
205 | operation_state: &StackOperationState, |
206 | |
207 | async move |
208 | stack |
209 | .setting_update |
210 | *object. .unwrap, |
211 | *setting. .unwrap, |
212 | operation_state, |
213 | |
214 | .await |
215 | |
216 | .boxed_local |
217 | |
218 | |
219 | |
220 | |
221 | |
222 | Self |
223 | name: name, |
224 | deserialize: deserialize, |
225 | serialize: serialize, |
226 | setting_updated: setting_updated, |
227 | |
228 | |
229 | |
230 |