Re-expose Operation State in generics.
This is the worst code I have ever written. I hate the way this changes everything. ugh.
parent: tbd commit: 90db3e2
1 | use Future; |
2 | use OperationError; |
3 | |
4 | use crate::; |
5 | |
6 | |
7 | |
8 | IntoGiteratedHandler for H |
9 | |
10 | H: FnMut(R1, S) -> Fut + Clone, |
11 | Fut: + 'static, |
12 | Success: 'static, |
13 | Failure: 'static, |
14 | R1: 'static, |
15 | S: 'static, |
16 | OS: 'static, |
17 | |
18 | type Future = Fut; |
19 | |
20 | async |
21 | &self, |
22 | parameters: , |
23 | state: S, |
24 | _operation_state: OS, |
25 | |
26 | let = parameters; |
27 | .await |
28 | |
29 | |
30 | |
31 | |
32 | |
33 | IntoGiteratedHandler for H |
34 | |
35 | H: FnMut(R1, S, A1) -> Fut + Clone, |
36 | Fut: + 'static, |
37 | Success: 'static, |
38 | Failure: 'static, |
39 | R1: 'static, |
40 | S: 'static, |
41 | OS: 'static, |
42 | A1: , |
43 | : , | Error
44 | |
45 | type Future = Fut; |
46 | |
47 | async |
48 | &self, |
49 | parameters: , |
50 | state: S, |
51 | operation_state: OS, |
52 | |
53 | let a1 = A1 from_handler_state |
54 | .await |
55 | .map_err?; |
56 | let = parameters; |
57 | .await |
58 | |
59 | |
60 | |
61 | |
62 | |
63 | IntoGiteratedHandler for H |
64 | |
65 | H: FnMut(R1, S, A1, A2) -> Fut + Clone, |
66 | Fut: + 'static, |
67 | Success: 'static, |
68 | Failure: 'static, |
69 | R1: 'static, |
70 | S: 'static, |
71 | OS: 'static, |
72 | A1: , |
73 | : , | Error
74 | A2: , |
75 | : , | Error
76 | |
77 | type Future = Fut; |
78 | |
79 | async |
80 | &self, |
81 | parameters: , |
82 | state: S, |
83 | operation_state: OS, |
84 | |
85 | let a1 = A1 from_handler_state |
86 | .await |
87 | .map_err?; |
88 | let a2 = A2 from_handler_state |
89 | .await |
90 | .map_err?; |
91 | let = parameters; |
92 | .await |
93 | |
94 | |
95 | |
96 | |
97 | |
98 | IntoGiteratedHandler for H |
99 | |
100 | H: FnMut(R1, S, A1, A2, A3) -> Fut + Clone, |
101 | Fut: + 'static, |
102 | Success: 'static, |
103 | Failure: 'static, |
104 | R1: 'static, |
105 | S: 'static, |
106 | OS: 'static, |
107 | A1: , |
108 | : , | Error
109 | A2: , |
110 | : , | Error
111 | A3: , |
112 | : , | Error
113 | |
114 | type Future = Fut; |
115 | |
116 | async |
117 | &self, |
118 | parameters: , |
119 | state: S, |
120 | operation_state: OS, |
121 | |
122 | let a1 = A1 from_handler_state |
123 | .await |
124 | .map_err?; |
125 | let a2 = A2 from_handler_state |
126 | .await |
127 | .map_err?; |
128 | let a3 = A3 from_handler_state |
129 | .await |
130 | .map_err?; |
131 | let = parameters; |
132 | .await |
133 | |
134 | |
135 | |
136 | |
137 | |
138 | IntoGiteratedHandler for H |
139 | |
140 | H: FnMut(R1, R2, S) -> Fut + Clone, |
141 | Fut: + 'static, |
142 | Success: 'static, |
143 | Failure: 'static, |
144 | R1: 'static, |
145 | R2: 'static, |
146 | S: 'static, |
147 | OS: 'static, |
148 | |
149 | type Future = Fut; |
150 | |
151 | async |
152 | &self, |
153 | parameters: , |
154 | state: S, |
155 | _operation_state: OS, |
156 | |
157 | let = parameters; |
158 | .await |
159 | |
160 | |
161 | |
162 | |
163 | |
164 | IntoGiteratedHandler for H |
165 | |
166 | H: FnMut(R1, R2, S, A1) -> Fut + Clone, |
167 | Fut: + 'static, |
168 | Success: 'static, |
169 | Failure: 'static, |
170 | R1: 'static, |
171 | R2: 'static, |
172 | S: 'static, |
173 | OS: 'static, |
174 | A1: , |
175 | : , | Error
176 | |
177 | type Future = Fut; |
178 | |
179 | async |
180 | &self, |
181 | parameters: , |
182 | state: S, |
183 | operation_state: OS, |
184 | |
185 | let a1 = A1 from_handler_state |
186 | .await |
187 | .map_err?; |
188 | |
189 | let = parameters; |
190 | .await |
191 | |
192 | |
193 | |
194 | |
195 | |
196 | IntoGiteratedHandler for H |
197 | |
198 | H: FnMut(R1, R2, S, A1, A2) -> Fut + Clone, |
199 | Fut: + 'static, |
200 | Success: 'static, |
201 | Failure: 'static, |
202 | R1: 'static, |
203 | R2: 'static, |
204 | S: 'static, |
205 | OS: 'static, |
206 | A1: , |
207 | : , | Error
208 | A2: , |
209 | : , | Error
210 | |
211 | type Future = Fut; |
212 | |
213 | async |
214 | &self, |
215 | parameters: , |
216 | state: S, |
217 | operation_state: OS, |
218 | |
219 | let a1 = A1 from_handler_state |
220 | .await |
221 | .map_err?; |
222 | let a2 = A2 from_handler_state |
223 | .await |
224 | .map_err?; |
225 | |
226 | let = parameters; |
227 | .await |
228 | |
229 | |
230 | |
231 | |
232 | |
233 | IntoGiteratedHandler |
234 | for H |
235 | |
236 | H: FnMut(R1, R2, S, A1, A2, A3) -> Fut + Clone, |
237 | Fut: + 'static, |
238 | Success: 'static, |
239 | Failure: 'static, |
240 | R1: 'static, |
241 | R2: 'static, |
242 | S: 'static, |
243 | OS: 'static, |
244 | A1: , |
245 | : , | Error
246 | A2: , |
247 | : , | Error
248 | A3: , |
249 | : , | Error
250 | |
251 | type Future = Fut; |
252 | |
253 | async |
254 | &self, |
255 | parameters: , |
256 | state: S, |
257 | operation_state: OS, |
258 | |
259 | let a1 = A1 from_handler_state |
260 | .await |
261 | .map_err?; |
262 | let a2 = A2 from_handler_state |
263 | .await |
264 | .map_err?; |
265 | let a3 = A3 from_handler_state |
266 | .await |
267 | .map_err?; |
268 | |
269 | let = parameters; |
270 | .await |
271 | |
272 | |
273 |