Git repository hosting, collaboration, and discovery for the Fediverse.
Update to new structure
parent: tbd commit: b49b7cd
1 | use Error; |
2 | use ; |
3 | use |
4 | , | ConnectionError
5 | |
6 | , |
7 | , | Instance
8 | , |
9 | ; |
10 | use ; |
11 | use Message; |
12 | |
13 | use crate DaemonConnectionPool; |
14 | |
15 | |
16 | request: &'a T, |
17 | |
18 | PreparedRequest |
19 | request: new_empty, |
20 | instance: None, |
21 | |
22 | |
23 | |
24 | |
25 | instance: &'a Instance, |
26 | request: &'a T, |
27 | |
28 | PreparedRequest |
29 | request: new_empty, |
30 | instance: Some, |
31 | |
32 | |
33 | |
34 | |
35 | instance: , |
36 | request: , |
37 | |
38 | |
39 | |
40 | |
41 | mut self, |
42 | source: &impl , |
43 | |
44 | self.request.append_authentication; |
45 | |
46 | self |
47 | |
48 | |
49 | pub async |
50 | self, |
51 | pool: &DaemonConnectionPool, |
52 | |
53 | let mut socket = pool.0.get .await.unwrap; |
54 | |
55 | let payload = to_vec .unwrap; |
56 | |
57 | socket.send .await?; |
58 | |
59 | while let Some = socket.next .await |
60 | let payload = match message? |
61 | => payload, | Binary
62 | _ => |
63 | continue; |
64 | |
65 | ; |
66 | |
67 | let as_target = .map_err; |
68 | |
69 | if as_target.is_err |
70 | // Maybe we got an error payload? |
71 | if let Ok = |
72 | return Err; |
73 | |
74 | else |
75 | // We did not get an error payload, forward the deserialization error from the |
76 | // expected type |
77 | return as_target; |
78 | |
79 | |
80 | |
81 | panic! |
82 | |
83 | |
84 |