no clue what this is
parent: tbd commit: 7889bf6
1 | use |
2 | , | PhantomData
3 | , |
4 | , |
5 | ; |
6 | |
7 | use Error; |
8 | |
9 | |
10 | |
11 | state: &mut State, |
12 | object: &O, |
13 | operation: &D, |
14 | ; |
15 | |
16 | |
17 | ; |
18 | |
19 | |
20 | |
21 | todo! |
22 | |
23 | |
24 | |
25 | use c_linked_list CLinkedListMut; |
26 | use ; |
27 | |
28 | use crate:: |
29 | , | FfiValueUntyped
30 | , |
31 | FfiValue, |
32 | ; |
33 | |
34 | |
35 | |
36 | |
37 | list: mut >, |
38 | |
39 | |
40 | unsafe |
41 | unsafe |
42 | |
43 | |
44 | |
45 | let value = new |
46 | next_item: null, |
47 | state_uuid: 0, |
48 | state: , |
49 | ; |
50 | |
51 | State |
52 | list: unsafe |
53 | from_ptr |
54 | n.next_item as *mut |
55 | |
56 | , |
57 | |
58 | |
59 | |
60 | |
61 | |
62 | |
63 | state: FfiValueUntyped, |
64 | |
65 | |
66 | |
67 | pub unsafe |
68 | Self |
69 | state: FfiValueUntyped |
70 | inner: self.state.inner, |
71 | _type_marker: PhantomData, |
72 | _abi_marker: PhantomData, |
73 | , |
74 | |
75 | |
76 | |
77 | |
78 | |
79 | |
80 | /// The pointer to the next item. |
81 | /// |
82 | /// `next_item` is most likely always an `FfiValue<StateItem<()>>` and that's how we free them. |
83 | next_item: *const , |
84 | pub state_uuid: u128, |
85 | pub state: T, |
86 | |
87 | |
88 | |
89 | |
90 | f.debug_struct |
91 | .field |
92 | .finish |
93 | |
94 | |
95 | |
96 | |
97 | |
98 | let state_manager = unsafe ; |
99 | |
100 | // for state in state_manager {} |
101 | |
102 | |
103 | |
104 | |
105 | state: S, |
106 | _marker: , |
107 | |
108 | |
109 | |
110 | pub unsafe |
111 | Self |
112 | state: handle, |
113 | _marker: PhantomData, |
114 | |
115 | |
116 | |
117 | pub unsafe |
118 | let list = &mut self.state.list; |
119 | let last_item = list.iter_mut .last .unwrap; |
120 | |
121 | last_item.next_item = unsafe |
122 | new |
123 | next_item: null, |
124 | state_uuid: uuid, |
125 | state, |
126 | |
127 | .ptr |
128 | as *const ; |
129 | |
130 | self |
131 | |
132 | |
133 | |
134 | |
135 | pub unsafe |
136 | Self |
137 | state: handle, |
138 | _marker: PhantomData, |
139 | |
140 | |
141 | |
142 | pub unsafe |
143 | println!; |
144 | |
145 | for state in self.state.list.iter |
146 | println!; |
147 | if state.state_uuid == uuid |
148 | let state: *const = unsafe ; |
149 | |
150 | let value_ref = state.as_ref .unwrap; |
151 | let value_ref = &value_ref.state as *const S; |
152 | |
153 | return value_ref.as_ref; |
154 | |
155 | |
156 | |
157 | None |
158 | |
159 | |
160 | |
161 | |
162 | ; |
163 | |
164 | |
165 | None |
166 | |
167 | |
168 | |
169 | /// State values for the current execution domain. 99.99% of the time this means "plugin-specific" |
170 | /// |
171 | /// The remainder 0.01% of the time it refers to the daemon's runtime domain. |
172 | |
173 | ; |
174 | |
175 | |
176 | |
177 | 32894238940832489328402398490328423 |
178 | |
179 | |
180 | |
181 | ; |
182 | |
183 | |
184 | |
185 | todo! |
186 | |
187 | |
188 | |
189 | |
190 | |
191 | todo! |
192 | |
193 | |
194 | |
195 | |
196 | ; |
197 | |
198 | |
199 | |
200 | |
201 | todo! |
202 | |
203 | |
204 | |
205 | |
206 | |
207 | todo! |
208 | |
209 | |
210 |