Beginning of `stack-next` refactor
-Refactoring the protocol stack into something similar to a runtime. -Handles merging handler builders which is placing the ground work for plugins in. - Increased metadata generation during compilation enables less ser/de during execution. - Goal is to have an O(1) time from incoming operation to calling handlers. - Decreased penalty for using the statically typed API from within your code, now avoids some allocation. # Changes - Added `GiteratedRuntime` which is to replace the current unified stack - Added `RuntimeBuilder` which does what the current `OperationHandlers` struct does, but much better. - Added `RuntimeMetadata` to store type metadata for new `Any` based internals - Refactored serde_json out of the internal operation handling
parent: tbd commit: 708dea4
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | use Error; |
8 | use async_trait; |
9 | use AuthenticatedUser; |
10 | use Value; |
11 | |
12 | use crate GitBackendError; |
13 | use UserAuthenticationToken; |
14 | |
15 | use |
16 | AuthenticationTokenRequest, Instance, RegisterAccountRequest, RepositoryCreateRequest, |
17 | ; |
18 | |
19 | use |
20 | Commit, IssueLabel, Repository, RepositoryCommitBeforeRequest, RepositoryDiff, |
21 | RepositoryDiffPatchRequest, RepositoryDiffRequest, RepositoryFile, RepositoryFileFromIdRequest, |
22 | RepositoryFileFromPathRequest, RepositoryFileInspectRequest, RepositoryIssue, |
23 | RepositoryIssueLabelsRequest, RepositoryIssuesCountRequest, RepositoryIssuesRequest, |
24 | RepositorySummary, RepositoryTreeEntry, |
25 | ; |
26 | use AnySetting; |
27 | use User; |
28 | use AnyValue; |
29 | |
30 | |
31 | |
32 | async |
33 | &mut self, |
34 | user: &AuthenticatedUser, |
35 | request: &RepositoryCreateRequest, |
36 | ; |
37 | async |
38 | &mut self, |
39 | requester: & , |
40 | repository: &Repository, |
41 | request: &RepositoryFileInspectRequest, |
42 | ; |
43 | async |
44 | &mut self, |
45 | requester: & , |
46 | repository: &Repository, |
47 | request: &RepositoryFileFromIdRequest, |
48 | ; |
49 | async |
50 | &mut self, |
51 | requester: & , |
52 | repository: &Repository, |
53 | request: &RepositoryFileFromPathRequest, |
54 | ; |
55 | async |
56 | &mut self, |
57 | requester: & , |
58 | repository: &Repository, |
59 | request: &RepositoryDiffRequest, |
60 | ; |
61 | async |
62 | &mut self, |
63 | requester: & , |
64 | repository: &Repository, |
65 | request: &RepositoryDiffPatchRequest, |
66 | ; |
67 | async |
68 | &mut self, |
69 | requester: & , |
70 | repository: &Repository, |
71 | request: &RepositoryCommitBeforeRequest, |
72 | ; |
73 | async |
74 | &mut self, |
75 | user: &Repository, |
76 | name: &str, |
77 | ; |
78 | async ; |
79 | async |
80 | &mut self, |
81 | repository: &Repository, |
82 | name: &str, |
83 | setting: &Value, |
84 | ; |
85 | async |
86 | &mut self, |
87 | requester: & , |
88 | repository: &Repository, |
89 | ; |
90 | |
91 | |
92 | |
93 | |
94 | &mut self, |
95 | requester: & , |
96 | request: &RepositoryIssuesCountRequest, |
97 | ; |
98 | |
99 | &mut self, |
100 | requester: & , |
101 | request: &RepositoryIssueLabelsRequest, |
102 | ; |
103 | |
104 | &mut self, |
105 | requester: & , |
106 | request: &RepositoryIssuesRequest, |
107 | ; |
108 | |
109 | |
110 | |
111 | |
112 | async |
113 | &mut self, |
114 | request: RegisterAccountRequest, |
115 | ; |
116 | |
117 | async |
118 | &mut self, |
119 | source: &Instance, |
120 | request: AuthenticationTokenRequest, |
121 | ; |
122 | |
123 | |
124 | |
125 | |
126 | async ; |
127 | async ; |
128 | async |
129 | &mut self, |
130 | user: &User, |
131 | name: &str, |
132 | setting: &Value, |
133 | ; |
134 | async ; |
135 | async |
136 | &mut self, |
137 | requester: & , |
138 | user: &User, |
139 | ; |
140 | |
141 | |
142 | |
143 | |
144 | async ; |
145 | async |
146 | &mut self, |
147 | user: &User, |
148 | name: &str, |
149 | setting: AnySetting, |
150 | ; |
151 | async |
152 | &mut self, |
153 | repository: &Repository, |
154 | name: &str, |
155 | ; |
156 | async |
157 | &mut self, |
158 | repository: &Repository, |
159 | name: &str, |
160 | setting: AnySetting, |
161 | ; |
162 | |
163 |