1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 2 | ::pin_project_lite::pin_project! {
|
3 3 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
4 4 | /// [`RpcEchoInput`](crate::input::RpcEchoInput) using modelled bindings.
|
5 5 | pub struct RpcEchoInputFuture {
|
6 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RpcEchoInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
|
6 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RpcEchoInput, ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
|
7 7 | }
|
8 8 | }
|
9 9 |
|
10 10 | impl std::future::Future for RpcEchoInputFuture {
|
11 11 | type Output = Result<
|
12 12 | crate::input::RpcEchoInput,
|
13 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
|
13 + | ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError,
|
14 14 | >;
|
15 15 |
|
16 16 | fn poll(
|
17 17 | self: std::pin::Pin<&mut Self>,
|
18 18 | cx: &mut std::task::Context<'_>,
|
19 19 | ) -> std::task::Poll<Self::Output> {
|
20 20 | let this = self.project();
|
21 21 | this.inner.as_mut().poll(cx)
|
22 22 | }
|
23 23 | }
|
24 24 |
|
25 25 | impl<B>
|
26 - | ::aws_smithy_http_server::request::FromRequest<
|
27 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
26 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
27 + | ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
|
28 28 | B,
|
29 29 | > for crate::input::RpcEchoInput
|
30 30 | where
|
31 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
31 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
32 32 | B: 'static,
|
33 33 |
|
34 34 | B::Data: Send,
|
35 - | ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
|
36 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
35 + | ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
|
36 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
37 37 | {
|
38 - | type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
|
38 + | type Rejection =
|
39 + | ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError;
|
39 40 | type Future = RpcEchoInputFuture;
|
40 41 |
|
41 42 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
42 43 | let fut = async move {
|
43 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
44 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
44 45 | request.headers(),
|
45 46 | &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_1,
|
46 47 | ) {
|
47 - | return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
|
48 + | return Err(::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
|
48 49 | }
|
49 50 | crate::protocol_serde::shape_rpc_echo::de_rpc_echo_http_request(request).await
|
50 51 | };
|
51 52 | use ::futures_util::future::TryFutureExt;
|
52 - | let fut = fut.map_err(
|
53 - | |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
|
53 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection| {
|
54 54 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
55 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
|
56 - | },
|
57 - | );
|
55 + | ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
|
56 + | });
|
58 57 | RpcEchoInputFuture {
|
59 58 | inner: Box::pin(fut),
|
60 59 | }
|
61 60 | }
|
62 61 | }
|
63 62 | impl
|
64 - | ::aws_smithy_http_server::response::IntoResponse<
|
65 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
63 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
64 + | ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
|
66 65 | > for crate::output::RpcEchoOutput
|
67 66 | {
|
68 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
67 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
69 68 | match crate::protocol_serde::shape_rpc_echo::ser_rpc_echo_http_response(self) {
|
70 69 | Ok(response) => response,
|
71 70 | Err(e) => {
|
72 71 | ::tracing::error!(error = %e, "failed to serialize response");
|
73 - | ::aws_smithy_http_server::response::IntoResponse::<
|
74 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
75 - | >::into_response(
|
76 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
|
77 - | e,
|
78 - | ),
|
79 - | )
|
72 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
|
80 73 | }
|
81 74 | }
|
82 75 | }
|
83 76 | }
|
84 77 | impl
|
85 - | ::aws_smithy_http_server::response::IntoResponse<
|
86 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
78 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
79 + | ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
|
87 80 | > for crate::error::RPCEchoError
|
88 81 | {
|
89 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
82 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
90 83 | match crate::protocol_serde::shape_rpc_echo::ser_rpc_echo_http_error(&self) {
|
91 84 | Ok(mut response) => {
|
92 85 | response.extensions_mut().insert(
|
93 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
86 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
87 + | self.name(),
|
88 + | ),
|
94 89 | );
|
95 90 | response
|
96 91 | }
|
97 92 | Err(e) => {
|
98 93 | ::tracing::error!(error = %e, "failed to serialize response");
|
99 - | ::aws_smithy_http_server::response::IntoResponse::<
|
100 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
101 - | >::into_response(
|
102 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
|
103 - | e,
|
104 - | ),
|
105 - | )
|
94 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
|
106 95 | }
|
107 96 | }
|
108 97 | }
|
109 98 | }
|
110 99 |
|
111 100 | ::pin_project_lite::pin_project! {
|
112 101 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
113 102 | /// [`MatchInput`](crate::input::MatchInput) using modelled bindings.
|
114 103 | pub struct MatchInputFuture {
|
115 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MatchInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
|
104 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MatchInput, ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
|
116 105 | }
|
117 106 | }
|
118 107 |
|
119 108 | impl std::future::Future for MatchInputFuture {
|
120 109 | type Output = Result<
|
121 110 | crate::input::MatchInput,
|
122 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
|
111 + | ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError,
|
123 112 | >;
|
124 113 |
|
125 114 | fn poll(
|
126 115 | self: std::pin::Pin<&mut Self>,
|
127 116 | cx: &mut std::task::Context<'_>,
|
128 117 | ) -> std::task::Poll<Self::Output> {
|
129 118 | let this = self.project();
|
130 119 | this.inner.as_mut().poll(cx)
|
131 120 | }
|
132 121 | }
|
133 122 |
|
134 123 | impl<B>
|
135 - | ::aws_smithy_http_server::request::FromRequest<
|
136 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
124 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
125 + | ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
|
137 126 | B,
|
138 127 | > for crate::input::MatchInput
|
139 128 | where
|
140 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
129 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
141 130 | B: 'static,
|
142 131 |
|
143 132 | B::Data: Send,
|
144 - | ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
|
145 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
133 + | ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
|
134 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
146 135 | {
|
147 - | type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
|
136 + | type Rejection =
|
137 + | ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError;
|
148 138 | type Future = MatchInputFuture;
|
149 139 |
|
150 140 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
151 141 | let fut = async move {
|
152 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
142 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
153 143 | request.headers(),
|
154 144 | &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_1,
|
155 145 | ) {
|
156 - | return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
|
146 + | return Err(::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
|
157 147 | }
|
158 148 | crate::protocol_serde::shape_match::de_match_http_request(request).await
|
159 149 | };
|
160 150 | use ::futures_util::future::TryFutureExt;
|
161 - | let fut = fut.map_err(
|
162 - | |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
|
151 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection| {
|
163 152 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
164 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
|
165 - | },
|
166 - | );
|
153 + | ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
|
154 + | });
|
167 155 | MatchInputFuture {
|
168 156 | inner: Box::pin(fut),
|
169 157 | }
|
170 158 | }
|
171 159 | }
|
172 160 | impl
|
173 - | ::aws_smithy_http_server::response::IntoResponse<
|
174 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
161 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
162 + | ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
|
175 163 | > for crate::output::MatchOutput
|
176 164 | {
|
177 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
165 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
178 166 | match crate::protocol_serde::shape_match::ser_match_http_response(self) {
|
179 167 | Ok(response) => response,
|
180 168 | Err(e) => {
|
181 169 | ::tracing::error!(error = %e, "failed to serialize response");
|
182 - | ::aws_smithy_http_server::response::IntoResponse::<
|
183 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
184 - | >::into_response(
|
185 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
|
186 - | e,
|
187 - | ),
|
188 - | )
|
170 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
|
189 171 | }
|
190 172 | }
|
191 173 | }
|
192 174 | }
|
193 175 | impl
|
194 - | ::aws_smithy_http_server::response::IntoResponse<
|
195 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
176 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
177 + | ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
|
196 178 | > for crate::error::MatchError
|
197 179 | {
|
198 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
180 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
199 181 | match crate::protocol_serde::shape_match::ser_match_http_error(&self) {
|
200 182 | Ok(mut response) => {
|
201 183 | response.extensions_mut().insert(
|
202 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
184 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
185 + | self.name(),
|
186 + | ),
|
203 187 | );
|
204 188 | response
|
205 189 | }
|
206 190 | Err(e) => {
|
207 191 | ::tracing::error!(error = %e, "failed to serialize response");
|
208 - | ::aws_smithy_http_server::response::IntoResponse::<
|
209 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
210 - | >::into_response(
|
211 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
|
212 - | e,
|
213 - | ),
|
214 - | )
|
192 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
|
215 193 | }
|
216 194 | }
|
217 195 | }
|
218 196 | }
|
219 197 |
|
220 198 | ::pin_project_lite::pin_project! {
|
221 199 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
222 200 | /// [`OptionInput`](crate::input::OptionInput) using modelled bindings.
|
223 201 | pub struct OptionInputFuture {
|
224 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::OptionInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
|
202 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::OptionInput, ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
|
225 203 | }
|
226 204 | }
|
227 205 |
|
228 206 | impl std::future::Future for OptionInputFuture {
|
229 207 | type Output = Result<
|
230 208 | crate::input::OptionInput,
|
231 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
|
209 + | ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError,
|
232 210 | >;
|
233 211 |
|
234 212 | fn poll(
|
235 213 | self: std::pin::Pin<&mut Self>,
|
236 214 | cx: &mut std::task::Context<'_>,
|
237 215 | ) -> std::task::Poll<Self::Output> {
|
238 216 | let this = self.project();
|
239 217 | this.inner.as_mut().poll(cx)
|
240 218 | }
|
241 219 | }
|
242 220 |
|
243 221 | impl<B>
|
244 - | ::aws_smithy_http_server::request::FromRequest<
|
245 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
222 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
223 + | ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
|
246 224 | B,
|
247 225 | > for crate::input::OptionInput
|
248 226 | where
|
249 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
227 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
250 228 | B: 'static,
|
251 229 |
|
252 230 | B::Data: Send,
|
253 - | ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
|
254 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
231 + | ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
|
232 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
255 233 | {
|
256 - | type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
|
234 + | type Rejection =
|
235 + | ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError;
|
257 236 | type Future = OptionInputFuture;
|
258 237 |
|
259 238 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
260 239 | let fut = async move {
|
261 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
240 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
262 241 | request.headers(),
|
263 242 | &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_1,
|
264 243 | ) {
|
265 - | return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
|
244 + | return Err(::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
|
266 245 | }
|
267 246 | crate::protocol_serde::shape_option::de_option_http_request(request).await
|
268 247 | };
|
269 248 | use ::futures_util::future::TryFutureExt;
|
270 - | let fut = fut.map_err(
|
271 - | |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
|
249 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection| {
|
272 250 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
273 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
|
274 - | },
|
275 - | );
|
251 + | ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
|
252 + | });
|
276 253 | OptionInputFuture {
|
277 254 | inner: Box::pin(fut),
|
278 255 | }
|
279 256 | }
|
280 257 | }
|
281 258 | impl
|
282 - | ::aws_smithy_http_server::response::IntoResponse<
|
283 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
259 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
260 + | ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
|
284 261 | > for crate::output::OptionOutput
|
285 262 | {
|
286 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
263 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
287 264 | match crate::protocol_serde::shape_option::ser_option_http_response(self) {
|
288 265 | Ok(response) => response,
|
289 266 | Err(e) => {
|
290 267 | ::tracing::error!(error = %e, "failed to serialize response");
|
291 - | ::aws_smithy_http_server::response::IntoResponse::<
|
292 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
293 - | >::into_response(
|
294 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
|
295 - | e,
|
296 - | ),
|
297 - | )
|
268 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
|
298 269 | }
|
299 270 | }
|
300 271 | }
|
301 272 | }
|
302 273 | impl
|
303 - | ::aws_smithy_http_server::response::IntoResponse<
|
304 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
274 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
275 + | ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
|
305 276 | > for crate::error::OptionError
|
306 277 | {
|
307 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
278 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
308 279 | match crate::protocol_serde::shape_option::ser_option_http_error(&self) {
|
309 280 | Ok(mut response) => {
|
310 281 | response.extensions_mut().insert(
|
311 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
282 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
283 + | self.name(),
|
284 + | ),
|
312 285 | );
|
313 286 | response
|
314 287 | }
|
315 288 | Err(e) => {
|
316 289 | ::tracing::error!(error = %e, "failed to serialize response");
|
317 - | ::aws_smithy_http_server::response::IntoResponse::<
|
318 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
319 - | >::into_response(
|
320 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
|
321 - | e,
|
322 - | ),
|
323 - | )
|
290 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
|
324 291 | }
|
325 292 | }
|
326 293 | }
|
327 294 | }
|
328 295 |
|
329 296 | ::pin_project_lite::pin_project! {
|
330 297 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
331 298 | /// [`ResultInput`](crate::input::ResultInput) using modelled bindings.
|
332 299 | pub struct ResultInputFuture {
|
333 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResultInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
|
300 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResultInput, ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
|
334 301 | }
|
335 302 | }
|
336 303 |
|
337 304 | impl std::future::Future for ResultInputFuture {
|
338 305 | type Output = Result<
|
339 306 | crate::input::ResultInput,
|
340 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
|
307 + | ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError,
|
341 308 | >;
|
342 309 |
|
343 310 | fn poll(
|
344 311 | self: std::pin::Pin<&mut Self>,
|
345 312 | cx: &mut std::task::Context<'_>,
|
346 313 | ) -> std::task::Poll<Self::Output> {
|
347 314 | let this = self.project();
|
348 315 | this.inner.as_mut().poll(cx)
|
349 316 | }
|
350 317 | }
|
351 318 |
|
352 319 | impl<B>
|
353 - | ::aws_smithy_http_server::request::FromRequest<
|
354 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
320 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
321 + | ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
|
355 322 | B,
|
356 323 | > for crate::input::ResultInput
|
357 324 | where
|
358 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
325 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
359 326 | B: 'static,
|
360 327 |
|
361 328 | B::Data: Send,
|
362 - | ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
|
363 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
329 + | ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
|
330 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
364 331 | {
|
365 - | type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
|
332 + | type Rejection =
|
333 + | ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError;
|
366 334 | type Future = ResultInputFuture;
|
367 335 |
|
368 336 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
369 337 | let fut = async move {
|
370 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
338 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
371 339 | request.headers(),
|
372 340 | &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_1,
|
373 341 | ) {
|
374 - | return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
|
342 + | return Err(::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
|
375 343 | }
|
376 344 | crate::protocol_serde::shape_result::de_result_http_request(request).await
|
377 345 | };
|
378 346 | use ::futures_util::future::TryFutureExt;
|
379 - | let fut = fut.map_err(
|
380 - | |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
|
347 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection| {
|
381 348 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
382 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
|
383 - | },
|
384 - | );
|
349 + | ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
|
350 + | });
|
385 351 | ResultInputFuture {
|
386 352 | inner: Box::pin(fut),
|
387 353 | }
|
388 354 | }
|
389 355 | }
|
390 356 | impl
|
391 - | ::aws_smithy_http_server::response::IntoResponse<
|
392 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
357 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
358 + | ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
|
393 359 | > for crate::output::ResultOutput
|
394 360 | {
|
395 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
361 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
396 362 | match crate::protocol_serde::shape_result::ser_result_http_response(self) {
|
397 363 | Ok(response) => response,
|
398 364 | Err(e) => {
|
399 365 | ::tracing::error!(error = %e, "failed to serialize response");
|
400 - | ::aws_smithy_http_server::response::IntoResponse::<
|
401 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
402 - | >::into_response(
|
403 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
|
404 - | e,
|
405 - | ),
|
406 - | )
|
366 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
|
407 367 | }
|
408 368 | }
|
409 369 | }
|
410 370 | }
|
411 371 | impl
|
412 - | ::aws_smithy_http_server::response::IntoResponse<
|
413 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
372 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
373 + | ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
|
414 374 | > for crate::error::ResultError
|
415 375 | {
|
416 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
376 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
417 377 | match crate::protocol_serde::shape_result::ser_result_http_error(&self) {
|
418 378 | Ok(mut response) => {
|
419 379 | response.extensions_mut().insert(
|
420 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
380 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
381 + | self.name(),
|
382 + | ),
|
421 383 | );
|
422 384 | response
|
423 385 | }
|
424 386 | Err(e) => {
|
425 387 | ::tracing::error!(error = %e, "failed to serialize response");
|
426 - | ::aws_smithy_http_server::response::IntoResponse::<
|
427 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
428 - | >::into_response(
|
429 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
|
430 - | e,
|
431 - | ),
|
432 - | )
|
388 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
|
433 389 | }
|
434 390 | }
|
435 391 | }
|
436 392 | }
|
437 393 |
|
438 394 | ::pin_project_lite::pin_project! {
|
439 395 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
440 396 | /// [`ErrCollisionsInput`](crate::input::ErrCollisionsInput) using modelled bindings.
|
441 397 | pub struct ErrCollisionsInputFuture {
|
442 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ErrCollisionsInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
|
398 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ErrCollisionsInput, ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
|
443 399 | }
|
444 400 | }
|
445 401 |
|
446 402 | impl std::future::Future for ErrCollisionsInputFuture {
|
447 403 | type Output = Result<
|
448 404 | crate::input::ErrCollisionsInput,
|
449 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
|
405 + | ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError,
|
450 406 | >;
|
451 407 |
|
452 408 | fn poll(
|
453 409 | self: std::pin::Pin<&mut Self>,
|
454 410 | cx: &mut std::task::Context<'_>,
|
455 411 | ) -> std::task::Poll<Self::Output> {
|
456 412 | let this = self.project();
|
457 413 | this.inner.as_mut().poll(cx)
|
458 414 | }
|
459 415 | }
|
460 416 |
|
461 417 | impl<B>
|
462 - | ::aws_smithy_http_server::request::FromRequest<
|
463 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
418 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
419 + | ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
|
464 420 | B,
|
465 421 | > for crate::input::ErrCollisionsInput
|
466 422 | where
|
467 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
423 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
468 424 | B: 'static,
|
469 425 |
|
470 426 | B::Data: Send,
|
471 - | ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
|
472 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
427 + | ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
|
428 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
473 429 | {
|
474 - | type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
|
430 + | type Rejection =
|
431 + | ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError;
|
475 432 | type Future = ErrCollisionsInputFuture;
|
476 433 |
|
477 434 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
478 435 | let fut = async move {
|
479 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
436 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
480 437 | request.headers(),
|
481 438 | &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_1,
|
482 439 | ) {
|
483 - | return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
|
440 + | return Err(::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
|
484 441 | }
|
485 442 | crate::protocol_serde::shape_err_collisions::de_err_collisions_http_request(request)
|
486 443 | .await
|
487 444 | };
|
488 445 | use ::futures_util::future::TryFutureExt;
|
489 - | let fut = fut.map_err(
|
490 - | |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
|
446 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection| {
|
491 447 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
492 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
|
493 - | },
|
494 - | );
|
448 + | ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
|
449 + | });
|
495 450 | ErrCollisionsInputFuture {
|
496 451 | inner: Box::pin(fut),
|
497 452 | }
|
498 453 | }
|
499 454 | }
|
500 455 | impl
|
501 - | ::aws_smithy_http_server::response::IntoResponse<
|
502 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
456 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
457 + | ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
|
503 458 | > for crate::output::ErrCollisionsOutput
|
504 459 | {
|
505 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
460 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
506 461 | match crate::protocol_serde::shape_err_collisions::ser_err_collisions_http_response(self) {
|
507 462 | Ok(response) => response,
|
508 463 | Err(e) => {
|
509 464 | ::tracing::error!(error = %e, "failed to serialize response");
|
510 - | ::aws_smithy_http_server::response::IntoResponse::<
|
511 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
512 - | >::into_response(
|
513 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
|
514 - | e,
|
515 - | ),
|
516 - | )
|
465 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
|
517 466 | }
|
518 467 | }
|
519 468 | }
|
520 469 | }
|
521 470 | impl
|
522 - | ::aws_smithy_http_server::response::IntoResponse<
|
523 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
471 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
472 + | ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
|
524 473 | > for crate::error::ErrCollisionsError
|
525 474 | {
|
526 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
475 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
527 476 | match crate::protocol_serde::shape_err_collisions::ser_err_collisions_http_error(&self) {
|
528 477 | Ok(mut response) => {
|
529 478 | response.extensions_mut().insert(
|
530 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
479 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
480 + | self.name(),
|
481 + | ),
|
531 482 | );
|
532 483 | response
|
533 484 | }
|
534 485 | Err(e) => {
|
535 486 | ::tracing::error!(error = %e, "failed to serialize response");
|
536 - | ::aws_smithy_http_server::response::IntoResponse::<
|
537 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
538 - | >::into_response(
|
539 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
|
540 - | e,
|
541 - | ),
|
542 - | )
|
487 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
|
543 488 | }
|
544 489 | }
|
545 490 | }
|
546 491 | }
|
547 492 |
|
548 493 | ::pin_project_lite::pin_project! {
|
549 494 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
550 495 | /// [`StructureNamePunningInput`](crate::input::StructureNamePunningInput) using modelled bindings.
|
551 496 | pub struct StructureNamePunningInputFuture {
|
552 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StructureNamePunningInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
|
497 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StructureNamePunningInput, ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
|
553 498 | }
|
554 499 | }
|
555 500 |
|
556 501 | impl std::future::Future for StructureNamePunningInputFuture {
|
557 502 | type Output = Result<
|
558 503 | crate::input::StructureNamePunningInput,
|
559 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
|
504 + | ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError,
|
560 505 | >;
|
561 506 |
|
562 507 | fn poll(
|
563 508 | self: std::pin::Pin<&mut Self>,
|
564 509 | cx: &mut std::task::Context<'_>,
|
565 510 | ) -> std::task::Poll<Self::Output> {
|
566 511 | let this = self.project();
|
567 512 | this.inner.as_mut().poll(cx)
|
568 513 | }
|
569 514 | }
|
570 515 |
|
571 516 | impl<B>
|
572 - | ::aws_smithy_http_server::request::FromRequest<
|
573 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
517 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
518 + | ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
|
574 519 | B,
|
575 520 | > for crate::input::StructureNamePunningInput
|
576 521 | where
|
577 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
522 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
578 523 | B: 'static,
|
579 524 |
|
580 525 | B::Data: Send,
|
581 - | ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
|
582 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
526 + | ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
|
527 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
583 528 | {
|
584 - | type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
|
529 + | type Rejection =
|
530 + | ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError;
|
585 531 | type Future = StructureNamePunningInputFuture;
|
586 532 |
|
587 533 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
588 534 | let fut = async move {
|
589 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
535 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
590 536 | request.headers(),
|
591 537 | &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_1,
|
592 538 | ) {
|
593 - | return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
|
539 + | return Err(::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
|
594 540 | }
|
595 541 | crate::protocol_serde::shape_structure_name_punning::de_structure_name_punning_http_request(request)
|
596 542 | .await
|
597 543 | };
|
598 544 | use ::futures_util::future::TryFutureExt;
|
599 - | let fut = fut.map_err(
|
600 - | |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
|
545 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection| {
|
601 546 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
602 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
|
603 - | },
|
604 - | );
|
547 + | ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
|
548 + | });
|
605 549 | StructureNamePunningInputFuture {
|
606 550 | inner: Box::pin(fut),
|
607 551 | }
|
608 552 | }
|
609 553 | }
|
610 554 | impl
|
611 - | ::aws_smithy_http_server::response::IntoResponse<
|
612 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
555 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
556 + | ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
|
613 557 | > for crate::output::StructureNamePunningOutput
|
614 558 | {
|
615 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
559 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
616 560 | match crate::protocol_serde::shape_structure_name_punning::ser_structure_name_punning_http_response(self) {
|
617 561 | Ok(response) => response,
|
618 562 | Err(e) => {
|
619 563 | ::tracing::error!(error = %e, "failed to serialize response");
|
620 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
|
564 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
|
621 565 | }
|
622 566 | }
|
623 567 | }
|
624 568 | }
|
625 569 | impl
|
626 - | ::aws_smithy_http_server::response::IntoResponse<
|
627 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
570 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
571 + | ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
|
628 572 | > for crate::error::StructureNamePunningError
|
629 573 | {
|
630 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
574 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
631 575 | match crate::protocol_serde::shape_structure_name_punning::ser_structure_name_punning_http_error(&self) {
|
632 576 | Ok(mut response) => {
|
633 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
577 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
634 578 | response
|
635 579 | },
|
636 580 | Err(e) => {
|
637 581 | ::tracing::error!(error = %e, "failed to serialize response");
|
638 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
|
582 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
|
639 583 | }
|
640 584 | }
|
641 585 | }
|
642 586 | }
|
643 587 |
|
644 588 | ::pin_project_lite::pin_project! {
|
645 589 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
646 590 | /// [`ReservedWordsAsMembersInput`](crate::input::ReservedWordsAsMembersInput) using modelled bindings.
|
647 591 | pub struct ReservedWordsAsMembersInputFuture {
|
648 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ReservedWordsAsMembersInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
|
592 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ReservedWordsAsMembersInput, ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
|
649 593 | }
|
650 594 | }
|
651 595 |
|
652 596 | impl std::future::Future for ReservedWordsAsMembersInputFuture {
|
653 597 | type Output = Result<
|
654 598 | crate::input::ReservedWordsAsMembersInput,
|
655 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
|
599 + | ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError,
|
656 600 | >;
|
657 601 |
|
658 602 | fn poll(
|
659 603 | self: std::pin::Pin<&mut Self>,
|
660 604 | cx: &mut std::task::Context<'_>,
|
661 605 | ) -> std::task::Poll<Self::Output> {
|
662 606 | let this = self.project();
|
663 607 | this.inner.as_mut().poll(cx)
|
664 608 | }
|
665 609 | }
|
666 610 |
|
667 611 | impl<B>
|
668 - | ::aws_smithy_http_server::request::FromRequest<
|
669 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
612 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
613 + | ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
|
670 614 | B,
|
671 615 | > for crate::input::ReservedWordsAsMembersInput
|
672 616 | where
|
673 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
617 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
674 618 | B: 'static,
|
675 619 |
|
676 620 | B::Data: Send,
|
677 - | ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
|
678 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
621 + | ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
|
622 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
679 623 | {
|
680 - | type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
|
624 + | type Rejection =
|
625 + | ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError;
|
681 626 | type Future = ReservedWordsAsMembersInputFuture;
|
682 627 |
|
683 628 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
684 629 | let fut = async move {
|
685 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
630 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
686 631 | request.headers(),
|
687 632 | &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_1,
|
688 633 | ) {
|
689 - | return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
|
634 + | return Err(::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
|
690 635 | }
|
691 636 | crate::protocol_serde::shape_reserved_words_as_members::de_reserved_words_as_members_http_request(request)
|
692 637 | .await
|
693 638 | };
|
694 639 | use ::futures_util::future::TryFutureExt;
|
695 - | let fut = fut.map_err(
|
696 - | |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
|
640 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection| {
|
697 641 | ::tracing::debug!(error = %e, "failed to deserialize request");
|
698 - | ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
|
699 - | },
|
700 - | );
|
642 + | ::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
|
643 + | });
|
701 644 | ReservedWordsAsMembersInputFuture {
|
702 645 | inner: Box::pin(fut),
|
703 646 | }
|
704 647 | }
|
705 648 | }
|
706 649 | impl
|
707 - | ::aws_smithy_http_server::response::IntoResponse<
|
708 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
650 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
651 + | ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
|
709 652 | > for crate::output::ReservedWordsAsMembersOutput
|
710 653 | {
|
711 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
654 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
712 655 | match crate::protocol_serde::shape_reserved_words_as_members::ser_reserved_words_as_members_http_response(self) {
|
713 656 | Ok(response) => response,
|
714 657 | Err(e) => {
|
715 658 | ::tracing::error!(error = %e, "failed to serialize response");
|
716 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
|
659 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
|
717 660 | }
|
718 661 | }
|
719 662 | }
|
720 663 | }
|
721 664 | impl
|
722 - | ::aws_smithy_http_server::response::IntoResponse<
|
723 - | ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
|
665 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
666 + | ::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1,
|
724 667 | > for crate::error::ReservedWordsAsMembersError
|
725 668 | {
|
726 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
669 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
727 670 | match crate::protocol_serde::shape_reserved_words_as_members::ser_reserved_words_as_members_http_error(&self) {
|
728 671 | Ok(mut response) => {
|
729 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
672 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
730 673 | response
|
731 674 | },
|
732 675 | Err(e) => {
|
733 676 | ::tracing::error!(error = %e, "failed to serialize response");
|
734 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
|
677 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_legacy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
|
735 678 | }
|
736 679 | }
|
737 680 | }
|
738 681 | }
|