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 | /// [`HttpQueryParamsOnlyOperationInput`](crate::input::HttpQueryParamsOnlyOperationInput) using modelled bindings.
|
5 5 | pub struct HttpQueryParamsOnlyOperationInputFuture {
|
6 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpQueryParamsOnlyOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
6 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::HttpQueryParamsOnlyOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
7 7 | }
|
8 8 | }
|
9 9 |
|
10 10 | impl std::future::Future for HttpQueryParamsOnlyOperationInputFuture {
|
11 11 | type Output = Result<
|
12 12 | crate::input::HttpQueryParamsOnlyOperationInput,
|
13 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
13 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::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::rest_json_1::RestJson1,
|
26 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
27 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
28 28 | B,
|
29 29 | > for crate::input::HttpQueryParamsOnlyOperationInput
|
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::rest_json_1::rejection::RequestRejection:
|
36 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
35 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
36 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
37 37 | {
|
38 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
38 + | type Rejection =
|
39 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
39 40 | type Future = HttpQueryParamsOnlyOperationInputFuture;
|
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_JSON,
|
46 47 | ) {
|
47 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
48 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
48 49 | }
|
49 50 | crate::protocol_serde::shape_http_query_params_only_operation::de_http_query_params_only_operation_http_request(request)
|
50 51 | .await
|
51 52 | };
|
52 53 | use ::futures_util::future::TryFutureExt;
|
53 - | let fut = fut.map_err(
|
54 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
55 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
56 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
57 - | e,
|
58 - | )
|
59 - | },
|
60 - | );
|
54 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
55 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
56 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
57 + | });
|
61 58 | HttpQueryParamsOnlyOperationInputFuture {
|
62 59 | inner: Box::pin(fut),
|
63 60 | }
|
64 61 | }
|
65 62 | }
|
66 63 | impl
|
67 - | ::aws_smithy_http_server::response::IntoResponse<
|
68 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
64 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
65 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
69 66 | > for crate::output::HttpQueryParamsOnlyOperationOutput
|
70 67 | {
|
71 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
68 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
72 69 | match crate::protocol_serde::shape_http_query_params_only_operation::ser_http_query_params_only_operation_http_response(self) {
|
73 70 | Ok(response) => response,
|
74 71 | Err(e) => {
|
75 72 | ::tracing::error!(error = %e, "failed to serialize response");
|
76 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
73 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
77 74 | }
|
78 75 | }
|
79 76 | }
|
80 77 | }
|
81 78 | impl
|
82 - | ::aws_smithy_http_server::response::IntoResponse<
|
83 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
79 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
80 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
84 81 | > for crate::error::HttpQueryParamsOnlyOperationError
|
85 82 | {
|
86 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
83 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
87 84 | match crate::protocol_serde::shape_http_query_params_only_operation::ser_http_query_params_only_operation_http_error(&self) {
|
88 85 | Ok(mut response) => {
|
89 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
86 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
90 87 | response
|
91 88 | },
|
92 89 | Err(e) => {
|
93 90 | ::tracing::error!(error = %e, "failed to serialize response");
|
94 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
91 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
95 92 | }
|
96 93 | }
|
97 94 | }
|
98 95 | }
|
99 96 |
|
100 97 | ::pin_project_lite::pin_project! {
|
101 98 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
102 99 | /// [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput) using modelled bindings.
|
103 100 | pub struct QueryPrecedenceInputFuture {
|
104 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::QueryPrecedenceInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
101 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::QueryPrecedenceInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
105 102 | }
|
106 103 | }
|
107 104 |
|
108 105 | impl std::future::Future for QueryPrecedenceInputFuture {
|
109 106 | type Output = Result<
|
110 107 | crate::input::QueryPrecedenceInput,
|
111 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
108 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
112 109 | >;
|
113 110 |
|
114 111 | fn poll(
|
115 112 | self: std::pin::Pin<&mut Self>,
|
116 113 | cx: &mut std::task::Context<'_>,
|
117 114 | ) -> std::task::Poll<Self::Output> {
|
118 115 | let this = self.project();
|
119 116 | this.inner.as_mut().poll(cx)
|
120 117 | }
|
121 118 | }
|
122 119 |
|
123 120 | impl<B>
|
124 - | ::aws_smithy_http_server::request::FromRequest<
|
125 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
121 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
122 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
126 123 | B,
|
127 124 | > for crate::input::QueryPrecedenceInput
|
128 125 | where
|
129 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
126 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
130 127 | B: 'static,
|
131 128 |
|
132 129 | B::Data: Send,
|
133 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
134 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
130 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
131 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
135 132 | {
|
136 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
133 + | type Rejection =
|
134 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
137 135 | type Future = QueryPrecedenceInputFuture;
|
138 136 |
|
139 137 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
140 138 | let fut = async move {
|
141 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
139 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
142 140 | request.headers(),
|
143 141 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
144 142 | ) {
|
145 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
143 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
146 144 | }
|
147 145 | crate::protocol_serde::shape_query_precedence::de_query_precedence_http_request(request)
|
148 146 | .await
|
149 147 | };
|
150 148 | use ::futures_util::future::TryFutureExt;
|
151 - | let fut = fut.map_err(
|
152 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
153 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
154 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
155 - | e,
|
156 - | )
|
157 - | },
|
158 - | );
|
149 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
150 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
151 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
152 + | });
|
159 153 | QueryPrecedenceInputFuture {
|
160 154 | inner: Box::pin(fut),
|
161 155 | }
|
162 156 | }
|
163 157 | }
|
164 158 | impl
|
165 - | ::aws_smithy_http_server::response::IntoResponse<
|
166 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
159 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
160 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
167 161 | > for crate::output::QueryPrecedenceOutput
|
168 162 | {
|
169 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
163 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
170 164 | match crate::protocol_serde::shape_query_precedence::ser_query_precedence_http_response(
|
171 165 | self,
|
172 166 | ) {
|
173 167 | Ok(response) => response,
|
174 168 | Err(e) => {
|
175 169 | ::tracing::error!(error = %e, "failed to serialize response");
|
176 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
170 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
177 171 | }
|
178 172 | }
|
179 173 | }
|
180 174 | }
|
181 175 | impl
|
182 - | ::aws_smithy_http_server::response::IntoResponse<
|
183 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
176 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
177 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
184 178 | > for crate::error::QueryPrecedenceError
|
185 179 | {
|
186 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
180 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
187 181 | match crate::protocol_serde::shape_query_precedence::ser_query_precedence_http_error(&self)
|
188 182 | {
|
189 183 | Ok(mut response) => {
|
190 184 | response.extensions_mut().insert(
|
191 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
185 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
186 + | self.name(),
|
187 + | ),
|
192 188 | );
|
193 189 | response
|
194 190 | }
|
195 191 | Err(e) => {
|
196 192 | ::tracing::error!(error = %e, "failed to serialize response");
|
197 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
193 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
198 194 | }
|
199 195 | }
|
200 196 | }
|
201 197 | }
|
202 198 |
|
203 199 | ::pin_project_lite::pin_project! {
|
204 200 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
205 201 | /// [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput) using modelled bindings.
|
206 202 | pub struct EmptyStructWithContentOnWireOpInputFuture {
|
207 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::EmptyStructWithContentOnWireOpInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
203 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::EmptyStructWithContentOnWireOpInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
208 204 | }
|
209 205 | }
|
210 206 |
|
211 207 | impl std::future::Future for EmptyStructWithContentOnWireOpInputFuture {
|
212 208 | type Output = Result<
|
213 209 | crate::input::EmptyStructWithContentOnWireOpInput,
|
214 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
210 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
215 211 | >;
|
216 212 |
|
217 213 | fn poll(
|
218 214 | self: std::pin::Pin<&mut Self>,
|
219 215 | cx: &mut std::task::Context<'_>,
|
220 216 | ) -> std::task::Poll<Self::Output> {
|
221 217 | let this = self.project();
|
222 218 | this.inner.as_mut().poll(cx)
|
223 219 | }
|
224 220 | }
|
225 221 |
|
226 222 | impl<B>
|
227 - | ::aws_smithy_http_server::request::FromRequest<
|
228 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
223 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
224 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
229 225 | B,
|
230 226 | > for crate::input::EmptyStructWithContentOnWireOpInput
|
231 227 | where
|
232 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
228 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
233 229 | B: 'static,
|
234 230 |
|
235 231 | B::Data: Send,
|
236 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
237 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
232 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
233 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
238 234 | {
|
239 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
235 + | type Rejection =
|
236 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
240 237 | type Future = EmptyStructWithContentOnWireOpInputFuture;
|
241 238 |
|
242 239 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
243 240 | let fut = async move {
|
244 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
241 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
245 242 | request.headers(),
|
246 243 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
247 244 | ) {
|
248 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
245 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
249 246 | }
|
250 247 | crate::protocol_serde::shape_empty_struct_with_content_on_wire_op::de_empty_struct_with_content_on_wire_op_http_request(request)
|
251 248 | .await
|
252 249 | };
|
253 250 | use ::futures_util::future::TryFutureExt;
|
254 - | let fut = fut.map_err(
|
255 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
256 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
257 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
258 - | e,
|
259 - | )
|
260 - | },
|
261 - | );
|
251 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
252 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
253 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
254 + | });
|
262 255 | EmptyStructWithContentOnWireOpInputFuture {
|
263 256 | inner: Box::pin(fut),
|
264 257 | }
|
265 258 | }
|
266 259 | }
|
267 260 | impl
|
268 - | ::aws_smithy_http_server::response::IntoResponse<
|
269 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
261 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
262 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
270 263 | > for crate::output::EmptyStructWithContentOnWireOpOutput
|
271 264 | {
|
272 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
265 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
273 266 | match crate::protocol_serde::shape_empty_struct_with_content_on_wire_op::ser_empty_struct_with_content_on_wire_op_http_response(self) {
|
274 267 | Ok(response) => response,
|
275 268 | Err(e) => {
|
276 269 | ::tracing::error!(error = %e, "failed to serialize response");
|
277 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
270 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
278 271 | }
|
279 272 | }
|
280 273 | }
|
281 274 | }
|
282 275 | impl
|
283 - | ::aws_smithy_http_server::response::IntoResponse<
|
284 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
276 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
277 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
285 278 | > for crate::error::EmptyStructWithContentOnWireOpError
|
286 279 | {
|
287 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
280 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
288 281 | match crate::protocol_serde::shape_empty_struct_with_content_on_wire_op::ser_empty_struct_with_content_on_wire_op_http_error(&self) {
|
289 282 | Ok(mut response) => {
|
290 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
283 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
291 284 | response
|
292 285 | },
|
293 286 | Err(e) => {
|
294 287 | ::tracing::error!(error = %e, "failed to serialize response");
|
295 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
288 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
296 289 | }
|
297 290 | }
|
298 291 | }
|
299 292 | }
|
300 293 |
|
301 294 | ::pin_project_lite::pin_project! {
|
302 295 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
303 296 | /// [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput) using modelled bindings.
|
304 297 | pub struct CaseInsensitiveErrorOperationInputFuture {
|
305 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CaseInsensitiveErrorOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
298 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CaseInsensitiveErrorOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
306 299 | }
|
307 300 | }
|
308 301 |
|
309 302 | impl std::future::Future for CaseInsensitiveErrorOperationInputFuture {
|
310 303 | type Output = Result<
|
311 304 | crate::input::CaseInsensitiveErrorOperationInput,
|
312 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
305 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
313 306 | >;
|
314 307 |
|
315 308 | fn poll(
|
316 309 | self: std::pin::Pin<&mut Self>,
|
317 310 | cx: &mut std::task::Context<'_>,
|
318 311 | ) -> std::task::Poll<Self::Output> {
|
319 312 | let this = self.project();
|
320 313 | this.inner.as_mut().poll(cx)
|
321 314 | }
|
322 315 | }
|
323 316 |
|
324 317 | impl<B>
|
325 - | ::aws_smithy_http_server::request::FromRequest<
|
326 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
318 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
319 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
327 320 | B,
|
328 321 | > for crate::input::CaseInsensitiveErrorOperationInput
|
329 322 | where
|
330 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
323 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
331 324 | B: 'static,
|
332 325 |
|
333 326 | B::Data: Send,
|
334 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
335 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
327 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
328 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
336 329 | {
|
337 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
330 + | type Rejection =
|
331 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
338 332 | type Future = CaseInsensitiveErrorOperationInputFuture;
|
339 333 |
|
340 334 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
341 335 | let fut = async move {
|
342 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
336 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
343 337 | request.headers(),
|
344 338 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
345 339 | ) {
|
346 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
340 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
347 341 | }
|
348 342 | crate::protocol_serde::shape_case_insensitive_error_operation::de_case_insensitive_error_operation_http_request(request)
|
349 343 | .await
|
350 344 | };
|
351 345 | use ::futures_util::future::TryFutureExt;
|
352 - | let fut = fut.map_err(
|
353 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
354 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
355 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
356 - | e,
|
357 - | )
|
358 - | },
|
359 - | );
|
346 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
347 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
348 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
349 + | });
|
360 350 | CaseInsensitiveErrorOperationInputFuture {
|
361 351 | inner: Box::pin(fut),
|
362 352 | }
|
363 353 | }
|
364 354 | }
|
365 355 | impl
|
366 - | ::aws_smithy_http_server::response::IntoResponse<
|
367 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
356 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
357 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
368 358 | > for crate::output::CaseInsensitiveErrorOperationOutput
|
369 359 | {
|
370 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
360 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
371 361 | match crate::protocol_serde::shape_case_insensitive_error_operation::ser_case_insensitive_error_operation_http_response(self) {
|
372 362 | Ok(response) => response,
|
373 363 | Err(e) => {
|
374 364 | ::tracing::error!(error = %e, "failed to serialize response");
|
375 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
365 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
376 366 | }
|
377 367 | }
|
378 368 | }
|
379 369 | }
|
380 370 | impl
|
381 - | ::aws_smithy_http_server::response::IntoResponse<
|
382 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
371 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
372 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
383 373 | > for crate::error::CaseInsensitiveErrorOperationError
|
384 374 | {
|
385 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
375 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
386 376 | match crate::protocol_serde::shape_case_insensitive_error_operation::ser_case_insensitive_error_operation_http_error(&self) {
|
387 377 | Ok(mut response) => {
|
388 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
378 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
389 379 | response
|
390 380 | },
|
391 381 | Err(e) => {
|
392 382 | ::tracing::error!(error = %e, "failed to serialize response");
|
393 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
383 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
394 384 | }
|
395 385 | }
|
396 386 | }
|
397 387 | }
|
398 388 |
|
399 389 | ::pin_project_lite::pin_project! {
|
400 390 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
401 391 | /// [`NullInNonSparseInput`](crate::input::NullInNonSparseInput) using modelled bindings.
|
402 392 | pub struct NullInNonSparseInputFuture {
|
403 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::NullInNonSparseInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
393 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::NullInNonSparseInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
404 394 | }
|
405 395 | }
|
406 396 |
|
407 397 | impl std::future::Future for NullInNonSparseInputFuture {
|
408 398 | type Output = Result<
|
409 399 | crate::input::NullInNonSparseInput,
|
410 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
400 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
411 401 | >;
|
412 402 |
|
413 403 | fn poll(
|
414 404 | self: std::pin::Pin<&mut Self>,
|
415 405 | cx: &mut std::task::Context<'_>,
|
416 406 | ) -> std::task::Poll<Self::Output> {
|
417 407 | let this = self.project();
|
418 408 | this.inner.as_mut().poll(cx)
|
419 409 | }
|
420 410 | }
|
421 411 |
|
422 412 | impl<B>
|
423 - | ::aws_smithy_http_server::request::FromRequest<
|
424 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
413 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
414 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
425 415 | B,
|
426 416 | > for crate::input::NullInNonSparseInput
|
427 417 | where
|
428 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
418 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
429 419 | B: 'static,
|
430 420 |
|
431 421 | B::Data: Send,
|
432 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
433 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
422 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
423 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
434 424 | {
|
435 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
425 + | type Rejection =
|
426 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
436 427 | type Future = NullInNonSparseInputFuture;
|
437 428 |
|
438 429 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
439 430 | let fut = async move {
|
440 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
431 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
441 432 | request.headers(),
|
442 433 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
443 434 | ) {
|
444 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
435 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
445 436 | }
|
446 437 | crate::protocol_serde::shape_null_in_non_sparse::de_null_in_non_sparse_http_request(
|
447 438 | request,
|
448 439 | )
|
449 440 | .await
|
450 441 | };
|
451 442 | use ::futures_util::future::TryFutureExt;
|
452 - | let fut = fut.map_err(
|
453 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
454 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
455 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
456 - | e,
|
457 - | )
|
458 - | },
|
459 - | );
|
443 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
444 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
445 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
446 + | });
|
460 447 | NullInNonSparseInputFuture {
|
461 448 | inner: Box::pin(fut),
|
462 449 | }
|
463 450 | }
|
464 451 | }
|
465 452 | impl
|
466 - | ::aws_smithy_http_server::response::IntoResponse<
|
467 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
453 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
454 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
468 455 | > for crate::output::NullInNonSparseOutput
|
469 456 | {
|
470 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
457 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
471 458 | match crate::protocol_serde::shape_null_in_non_sparse::ser_null_in_non_sparse_http_response(
|
472 459 | self,
|
473 460 | ) {
|
474 461 | Ok(response) => response,
|
475 462 | Err(e) => {
|
476 463 | ::tracing::error!(error = %e, "failed to serialize response");
|
477 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
464 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
478 465 | }
|
479 466 | }
|
480 467 | }
|
481 468 | }
|
482 469 | impl
|
483 - | ::aws_smithy_http_server::response::IntoResponse<
|
484 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
470 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
471 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
485 472 | > for crate::error::NullInNonSparseError
|
486 473 | {
|
487 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
474 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
488 475 | match crate::protocol_serde::shape_null_in_non_sparse::ser_null_in_non_sparse_http_error(
|
489 476 | &self,
|
490 477 | ) {
|
491 478 | Ok(mut response) => {
|
492 479 | response.extensions_mut().insert(
|
493 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
480 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
481 + | self.name(),
|
482 + | ),
|
494 483 | );
|
495 484 | response
|
496 485 | }
|
497 486 | Err(e) => {
|
498 487 | ::tracing::error!(error = %e, "failed to serialize response");
|
499 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
488 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
500 489 | }
|
501 490 | }
|
502 491 | }
|
503 492 | }
|
504 493 |
|
505 494 | ::pin_project_lite::pin_project! {
|
506 495 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
507 496 | /// [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput) using modelled bindings.
|
508 497 | pub struct EscapedStringValuesInputFuture {
|
509 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::EscapedStringValuesInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
498 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::EscapedStringValuesInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
510 499 | }
|
511 500 | }
|
512 501 |
|
513 502 | impl std::future::Future for EscapedStringValuesInputFuture {
|
514 503 | type Output = Result<
|
515 504 | crate::input::EscapedStringValuesInput,
|
516 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
505 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
517 506 | >;
|
518 507 |
|
519 508 | fn poll(
|
520 509 | self: std::pin::Pin<&mut Self>,
|
521 510 | cx: &mut std::task::Context<'_>,
|
522 511 | ) -> std::task::Poll<Self::Output> {
|
523 512 | let this = self.project();
|
524 513 | this.inner.as_mut().poll(cx)
|
525 514 | }
|
526 515 | }
|
527 516 |
|
528 517 | impl<B>
|
529 - | ::aws_smithy_http_server::request::FromRequest<
|
530 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
518 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
519 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
531 520 | B,
|
532 521 | > for crate::input::EscapedStringValuesInput
|
533 522 | where
|
534 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
523 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
535 524 | B: 'static,
|
536 525 |
|
537 526 | B::Data: Send,
|
538 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
539 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
527 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
528 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
540 529 | {
|
541 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
530 + | type Rejection =
|
531 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
542 532 | type Future = EscapedStringValuesInputFuture;
|
543 533 |
|
544 534 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
545 535 | let fut = async move {
|
546 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
536 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
547 537 | request.headers(),
|
548 538 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
549 539 | ) {
|
550 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
540 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
551 541 | }
|
552 542 | crate::protocol_serde::shape_escaped_string_values::de_escaped_string_values_http_request(request)
|
553 543 | .await
|
554 544 | };
|
555 545 | use ::futures_util::future::TryFutureExt;
|
556 - | let fut = fut.map_err(
|
557 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
558 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
559 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
560 - | e,
|
561 - | )
|
562 - | },
|
563 - | );
|
546 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
547 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
548 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
549 + | });
|
564 550 | EscapedStringValuesInputFuture {
|
565 551 | inner: Box::pin(fut),
|
566 552 | }
|
567 553 | }
|
568 554 | }
|
569 555 | impl
|
570 - | ::aws_smithy_http_server::response::IntoResponse<
|
571 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
556 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
557 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
572 558 | > for crate::output::EscapedStringValuesOutput
|
573 559 | {
|
574 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
560 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
575 561 | match crate::protocol_serde::shape_escaped_string_values::ser_escaped_string_values_http_response(self) {
|
576 562 | Ok(response) => response,
|
577 563 | Err(e) => {
|
578 564 | ::tracing::error!(error = %e, "failed to serialize response");
|
579 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
565 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
580 566 | }
|
581 567 | }
|
582 568 | }
|
583 569 | }
|
584 570 | impl
|
585 - | ::aws_smithy_http_server::response::IntoResponse<
|
586 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
571 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
572 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
587 573 | > for crate::error::EscapedStringValuesError
|
588 574 | {
|
589 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
575 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
590 576 | match crate::protocol_serde::shape_escaped_string_values::ser_escaped_string_values_http_error(&self) {
|
591 577 | Ok(mut response) => {
|
592 - | response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
578 + | response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
|
593 579 | response
|
594 580 | },
|
595 581 | Err(e) => {
|
596 582 | ::tracing::error!(error = %e, "failed to serialize response");
|
597 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
583 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
598 584 | }
|
599 585 | }
|
600 586 | }
|
601 587 | }
|
602 588 |
|
603 589 | ::pin_project_lite::pin_project! {
|
604 590 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
605 591 | /// [`PrimitiveIntOpInput`](crate::input::PrimitiveIntOpInput) using modelled bindings.
|
606 592 | pub struct PrimitiveIntOpInputFuture {
|
607 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::PrimitiveIntOpInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
593 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::PrimitiveIntOpInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
608 594 | }
|
609 595 | }
|
610 596 |
|
611 597 | impl std::future::Future for PrimitiveIntOpInputFuture {
|
612 598 | type Output = Result<
|
613 599 | crate::input::PrimitiveIntOpInput,
|
614 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
600 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
615 601 | >;
|
616 602 |
|
617 603 | fn poll(
|
618 604 | self: std::pin::Pin<&mut Self>,
|
619 605 | cx: &mut std::task::Context<'_>,
|
620 606 | ) -> std::task::Poll<Self::Output> {
|
621 607 | let this = self.project();
|
622 608 | this.inner.as_mut().poll(cx)
|
623 609 | }
|
624 610 | }
|
625 611 |
|
626 612 | impl<B>
|
627 - | ::aws_smithy_http_server::request::FromRequest<
|
628 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
613 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
614 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
629 615 | B,
|
630 616 | > for crate::input::PrimitiveIntOpInput
|
631 617 | where
|
632 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
618 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
633 619 | B: 'static,
|
634 620 |
|
635 621 | B::Data: Send,
|
636 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
637 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
622 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
623 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
638 624 | {
|
639 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
625 + | type Rejection =
|
626 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
640 627 | type Future = PrimitiveIntOpInputFuture;
|
641 628 |
|
642 629 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
643 630 | let fut = async move {
|
644 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
631 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
645 632 | request.headers(),
|
646 633 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
647 634 | ) {
|
648 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
635 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
649 636 | }
|
650 637 | crate::protocol_serde::shape_primitive_int_op::de_primitive_int_op_http_request(request)
|
651 638 | .await
|
652 639 | };
|
653 640 | use ::futures_util::future::TryFutureExt;
|
654 - | let fut = fut.map_err(
|
655 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
656 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
657 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
658 - | e,
|
659 - | )
|
660 - | },
|
661 - | );
|
641 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
642 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
643 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
644 + | });
|
662 645 | PrimitiveIntOpInputFuture {
|
663 646 | inner: Box::pin(fut),
|
664 647 | }
|
665 648 | }
|
666 649 | }
|
667 650 | impl
|
668 - | ::aws_smithy_http_server::response::IntoResponse<
|
669 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
651 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
652 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
670 653 | > for crate::output::PrimitiveIntOpOutput
|
671 654 | {
|
672 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
655 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
673 656 | match crate::protocol_serde::shape_primitive_int_op::ser_primitive_int_op_http_response(
|
674 657 | self,
|
675 658 | ) {
|
676 659 | Ok(response) => response,
|
677 660 | Err(e) => {
|
678 661 | ::tracing::error!(error = %e, "failed to serialize response");
|
679 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
662 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
680 663 | }
|
681 664 | }
|
682 665 | }
|
683 666 | }
|
684 667 | impl
|
685 - | ::aws_smithy_http_server::response::IntoResponse<
|
686 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
668 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
669 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
687 670 | > for crate::error::PrimitiveIntOpError
|
688 671 | {
|
689 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
672 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
690 673 | match crate::protocol_serde::shape_primitive_int_op::ser_primitive_int_op_http_error(&self)
|
691 674 | {
|
692 675 | Ok(mut response) => {
|
693 676 | response.extensions_mut().insert(
|
694 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
677 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
678 + | self.name(),
|
679 + | ),
|
695 680 | );
|
696 681 | response
|
697 682 | }
|
698 683 | Err(e) => {
|
699 684 | ::tracing::error!(error = %e, "failed to serialize response");
|
700 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
685 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
701 686 | }
|
702 687 | }
|
703 688 | }
|
704 689 | }
|
705 690 |
|
706 691 | ::pin_project_lite::pin_project! {
|
707 692 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
708 693 | /// [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput) using modelled bindings.
|
709 694 | pub struct MapWithEnumKeyOpInputFuture {
|
710 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MapWithEnumKeyOpInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
695 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MapWithEnumKeyOpInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
711 696 | }
|
712 697 | }
|
713 698 |
|
714 699 | impl std::future::Future for MapWithEnumKeyOpInputFuture {
|
715 700 | type Output = Result<
|
716 701 | crate::input::MapWithEnumKeyOpInput,
|
717 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
702 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
718 703 | >;
|
719 704 |
|
720 705 | fn poll(
|
721 706 | self: std::pin::Pin<&mut Self>,
|
722 707 | cx: &mut std::task::Context<'_>,
|
723 708 | ) -> std::task::Poll<Self::Output> {
|
724 709 | let this = self.project();
|
725 710 | this.inner.as_mut().poll(cx)
|
726 711 | }
|
727 712 | }
|
728 713 |
|
729 714 | impl<B>
|
730 - | ::aws_smithy_http_server::request::FromRequest<
|
731 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
715 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
716 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
732 717 | B,
|
733 718 | > for crate::input::MapWithEnumKeyOpInput
|
734 719 | where
|
735 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
720 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
736 721 | B: 'static,
|
737 722 |
|
738 723 | B::Data: Send,
|
739 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
740 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
724 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
725 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
741 726 | {
|
742 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
727 + | type Rejection =
|
728 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
743 729 | type Future = MapWithEnumKeyOpInputFuture;
|
744 730 |
|
745 731 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
746 732 | let fut = async move {
|
747 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
733 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
748 734 | request.headers(),
|
749 735 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
750 736 | ) {
|
751 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
737 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
752 738 | }
|
753 739 | crate::protocol_serde::shape_map_with_enum_key_op::de_map_with_enum_key_op_http_request(
|
754 740 | request,
|
755 741 | )
|
756 742 | .await
|
757 743 | };
|
758 744 | use ::futures_util::future::TryFutureExt;
|
759 - | let fut = fut.map_err(
|
760 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
761 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
762 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
763 - | e,
|
764 - | )
|
765 - | },
|
766 - | );
|
745 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
746 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
747 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
748 + | });
|
767 749 | MapWithEnumKeyOpInputFuture {
|
768 750 | inner: Box::pin(fut),
|
769 751 | }
|
770 752 | }
|
771 753 | }
|
772 754 | impl
|
773 - | ::aws_smithy_http_server::response::IntoResponse<
|
774 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
755 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
756 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
775 757 | > for crate::output::MapWithEnumKeyOpOutput
|
776 758 | {
|
777 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
759 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
778 760 | match crate::protocol_serde::shape_map_with_enum_key_op::ser_map_with_enum_key_op_http_response(self) {
|
779 761 | Ok(response) => response,
|
780 762 | Err(e) => {
|
781 763 | ::tracing::error!(error = %e, "failed to serialize response");
|
782 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
764 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
783 765 | }
|
784 766 | }
|
785 767 | }
|
786 768 | }
|
787 769 | impl
|
788 - | ::aws_smithy_http_server::response::IntoResponse<
|
789 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
770 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
771 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
790 772 | > for crate::error::MapWithEnumKeyOpError
|
791 773 | {
|
792 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
774 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
793 775 | match crate::protocol_serde::shape_map_with_enum_key_op::ser_map_with_enum_key_op_http_error(
|
794 776 | &self,
|
795 777 | ) {
|
796 778 | Ok(mut response) => {
|
797 779 | response.extensions_mut().insert(
|
798 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
780 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
781 + | self.name(),
|
782 + | ),
|
799 783 | );
|
800 784 | response
|
801 785 | }
|
802 786 | Err(e) => {
|
803 787 | ::tracing::error!(error = %e, "failed to serialize response");
|
804 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
788 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
805 789 | }
|
806 790 | }
|
807 791 | }
|
808 792 | }
|
809 793 |
|
810 794 | ::pin_project_lite::pin_project! {
|
811 795 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
812 796 | /// [`StatusResponseInput`](crate::input::StatusResponseInput) using modelled bindings.
|
813 797 | pub struct StatusResponseInputFuture {
|
814 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StatusResponseInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
798 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StatusResponseInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
815 799 | }
|
816 800 | }
|
817 801 |
|
818 802 | impl std::future::Future for StatusResponseInputFuture {
|
819 803 | type Output = Result<
|
820 804 | crate::input::StatusResponseInput,
|
821 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
805 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
822 806 | >;
|
823 807 |
|
824 808 | fn poll(
|
825 809 | self: std::pin::Pin<&mut Self>,
|
826 810 | cx: &mut std::task::Context<'_>,
|
827 811 | ) -> std::task::Poll<Self::Output> {
|
828 812 | let this = self.project();
|
829 813 | this.inner.as_mut().poll(cx)
|
830 814 | }
|
831 815 | }
|
832 816 |
|
833 817 | impl<B>
|
834 - | ::aws_smithy_http_server::request::FromRequest<
|
835 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
818 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
819 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
836 820 | B,
|
837 821 | > for crate::input::StatusResponseInput
|
838 822 | where
|
839 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
823 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
840 824 | B: 'static,
|
841 825 |
|
842 826 | B::Data: Send,
|
843 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
844 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
827 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
828 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
845 829 | {
|
846 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
830 + | type Rejection =
|
831 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
847 832 | type Future = StatusResponseInputFuture;
|
848 833 |
|
849 834 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
850 835 | let fut = async move {
|
851 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
836 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
852 837 | request.headers(),
|
853 838 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
854 839 | ) {
|
855 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
840 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
856 841 | }
|
857 842 | crate::protocol_serde::shape_status_response::de_status_response_http_request(request)
|
858 843 | .await
|
859 844 | };
|
860 845 | use ::futures_util::future::TryFutureExt;
|
861 - | let fut = fut.map_err(
|
862 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
863 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
864 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
865 - | e,
|
866 - | )
|
867 - | },
|
868 - | );
|
846 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
847 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
848 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
849 + | });
|
869 850 | StatusResponseInputFuture {
|
870 851 | inner: Box::pin(fut),
|
871 852 | }
|
872 853 | }
|
873 854 | }
|
874 855 | impl
|
875 - | ::aws_smithy_http_server::response::IntoResponse<
|
876 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
856 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
857 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
877 858 | > for crate::output::StatusResponseOutput
|
878 859 | {
|
879 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
860 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
880 861 | match crate::protocol_serde::shape_status_response::ser_status_response_http_response(self)
|
881 862 | {
|
882 863 | Ok(response) => response,
|
883 864 | Err(e) => {
|
884 865 | ::tracing::error!(error = %e, "failed to serialize response");
|
885 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
866 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
886 867 | }
|
887 868 | }
|
888 869 | }
|
889 870 | }
|
890 871 | impl
|
891 - | ::aws_smithy_http_server::response::IntoResponse<
|
892 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
872 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
873 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
893 874 | > for crate::error::StatusResponseError
|
894 875 | {
|
895 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
876 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
896 877 | match crate::protocol_serde::shape_status_response::ser_status_response_http_error(&self) {
|
897 878 | Ok(mut response) => {
|
898 879 | response.extensions_mut().insert(
|
899 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
880 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
881 + | self.name(),
|
882 + | ),
|
900 883 | );
|
901 884 | response
|
902 885 | }
|
903 886 | Err(e) => {
|
904 887 | ::tracing::error!(error = %e, "failed to serialize response");
|
905 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
888 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
906 889 | }
|
907 890 | }
|
908 891 | }
|
909 892 | }
|
910 893 |
|
911 894 | ::pin_project_lite::pin_project! {
|
912 895 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
913 896 | /// [`EnumQueryInput`](crate::input::EnumQueryInput) using modelled bindings.
|
914 897 | pub struct EnumQueryInputFuture {
|
915 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::EnumQueryInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
898 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::EnumQueryInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
916 899 | }
|
917 900 | }
|
918 901 |
|
919 902 | impl std::future::Future for EnumQueryInputFuture {
|
920 903 | type Output = Result<
|
921 904 | crate::input::EnumQueryInput,
|
922 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
905 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
923 906 | >;
|
924 907 |
|
925 908 | fn poll(
|
926 909 | self: std::pin::Pin<&mut Self>,
|
927 910 | cx: &mut std::task::Context<'_>,
|
928 911 | ) -> std::task::Poll<Self::Output> {
|
929 912 | let this = self.project();
|
930 913 | this.inner.as_mut().poll(cx)
|
931 914 | }
|
932 915 | }
|
933 916 |
|
934 917 | impl<B>
|
935 - | ::aws_smithy_http_server::request::FromRequest<
|
936 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
918 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
919 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
937 920 | B,
|
938 921 | > for crate::input::EnumQueryInput
|
939 922 | where
|
940 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
923 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
941 924 | B: 'static,
|
942 925 |
|
943 926 | B::Data: Send,
|
944 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
945 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
927 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
928 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
946 929 | {
|
947 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
930 + | type Rejection =
|
931 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
948 932 | type Future = EnumQueryInputFuture;
|
949 933 |
|
950 934 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
951 935 | let fut = async move {
|
952 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
936 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
953 937 | request.headers(),
|
954 938 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
955 939 | ) {
|
956 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
940 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
957 941 | }
|
958 942 | crate::protocol_serde::shape_enum_query::de_enum_query_http_request(request).await
|
959 943 | };
|
960 944 | use ::futures_util::future::TryFutureExt;
|
961 - | let fut = fut.map_err(
|
962 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
963 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
964 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
965 - | e,
|
966 - | )
|
967 - | },
|
968 - | );
|
945 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
946 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
947 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
948 + | });
|
969 949 | EnumQueryInputFuture {
|
970 950 | inner: Box::pin(fut),
|
971 951 | }
|
972 952 | }
|
973 953 | }
|
974 954 | impl
|
975 - | ::aws_smithy_http_server::response::IntoResponse<
|
976 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
955 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
956 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
977 957 | > for crate::output::EnumQueryOutput
|
978 958 | {
|
979 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
959 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
980 960 | match crate::protocol_serde::shape_enum_query::ser_enum_query_http_response(self) {
|
981 961 | Ok(response) => response,
|
982 962 | Err(e) => {
|
983 963 | ::tracing::error!(error = %e, "failed to serialize response");
|
984 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
964 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
985 965 | }
|
986 966 | }
|
987 967 | }
|
988 968 | }
|
989 969 | impl
|
990 - | ::aws_smithy_http_server::response::IntoResponse<
|
991 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
970 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
971 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
992 972 | > for crate::error::EnumQueryError
|
993 973 | {
|
994 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
974 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
995 975 | match crate::protocol_serde::shape_enum_query::ser_enum_query_http_error(&self) {
|
996 976 | Ok(mut response) => {
|
997 977 | response.extensions_mut().insert(
|
998 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
978 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
979 + | self.name(),
|
980 + | ),
|
999 981 | );
|
1000 982 | response
|
1001 983 | }
|
1002 984 | Err(e) => {
|
1003 985 | ::tracing::error!(error = %e, "failed to serialize response");
|
1004 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
986 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1005 987 | }
|
1006 988 | }
|
1007 989 | }
|
1008 990 | }
|
1009 991 |
|
1010 992 | ::pin_project_lite::pin_project! {
|
1011 993 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
1012 994 | /// [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput) using modelled bindings.
|
1013 995 | pub struct PrimitiveIntHeaderInputFuture {
|
1014 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::PrimitiveIntHeaderInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
996 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::PrimitiveIntHeaderInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1015 997 | }
|
1016 998 | }
|
1017 999 |
|
1018 1000 | impl std::future::Future for PrimitiveIntHeaderInputFuture {
|
1019 1001 | type Output = Result<
|
1020 1002 | crate::input::PrimitiveIntHeaderInput,
|
1021 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1003 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1022 1004 | >;
|
1023 1005 |
|
1024 1006 | fn poll(
|
1025 1007 | self: std::pin::Pin<&mut Self>,
|
1026 1008 | cx: &mut std::task::Context<'_>,
|
1027 1009 | ) -> std::task::Poll<Self::Output> {
|
1028 1010 | let this = self.project();
|
1029 1011 | this.inner.as_mut().poll(cx)
|
1030 1012 | }
|
1031 1013 | }
|
1032 1014 |
|
1033 1015 | impl<B>
|
1034 - | ::aws_smithy_http_server::request::FromRequest<
|
1035 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1016 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
1017 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1036 1018 | B,
|
1037 1019 | > for crate::input::PrimitiveIntHeaderInput
|
1038 1020 | where
|
1039 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
1021 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
1040 1022 | B: 'static,
|
1041 1023 |
|
1042 1024 | B::Data: Send,
|
1043 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1044 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
1025 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1026 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
1045 1027 | {
|
1046 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1028 + | type Rejection =
|
1029 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1047 1030 | type Future = PrimitiveIntHeaderInputFuture;
|
1048 1031 |
|
1049 1032 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
1050 1033 | let fut = async move {
|
1051 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
1034 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
1052 1035 | request.headers(),
|
1053 1036 | &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
|
1054 1037 | ) {
|
1055 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1038 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1056 1039 | }
|
1057 1040 | crate::protocol_serde::shape_primitive_int_header::de_primitive_int_header_http_request(
|
1058 1041 | request,
|
1059 1042 | )
|
1060 1043 | .await
|
1061 1044 | };
|
1062 1045 | use ::futures_util::future::TryFutureExt;
|
1063 - | let fut = fut.map_err(
|
1064 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1065 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1066 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
1067 - | e,
|
1068 - | )
|
1069 - | },
|
1070 - | );
|
1046 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1047 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1048 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
1049 + | });
|
1071 1050 | PrimitiveIntHeaderInputFuture {
|
1072 1051 | inner: Box::pin(fut),
|
1073 1052 | }
|
1074 1053 | }
|
1075 1054 | }
|
1076 1055 | impl
|
1077 - | ::aws_smithy_http_server::response::IntoResponse<
|
1078 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1056 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1057 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1079 1058 | > for crate::output::PrimitiveIntHeaderOutput
|
1080 1059 | {
|
1081 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1060 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1082 1061 | match crate::protocol_serde::shape_primitive_int_header::ser_primitive_int_header_http_response(self) {
|
1083 1062 | Ok(response) => response,
|
1084 1063 | Err(e) => {
|
1085 1064 | ::tracing::error!(error = %e, "failed to serialize response");
|
1086 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1065 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1087 1066 | }
|
1088 1067 | }
|
1089 1068 | }
|
1090 1069 | }
|
1091 1070 | impl
|
1092 - | ::aws_smithy_http_server::response::IntoResponse<
|
1093 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1071 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1072 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1094 1073 | > for crate::error::PrimitiveIntHeaderError
|
1095 1074 | {
|
1096 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1075 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1097 1076 | match crate::protocol_serde::shape_primitive_int_header::ser_primitive_int_header_http_error(
|
1098 1077 | &self,
|
1099 1078 | ) {
|
1100 1079 | Ok(mut response) => {
|
1101 1080 | response.extensions_mut().insert(
|
1102 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
1081 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
1082 + | self.name(),
|
1083 + | ),
|
1103 1084 | );
|
1104 1085 | response
|
1105 1086 | }
|
1106 1087 | Err(e) => {
|
1107 1088 | ::tracing::error!(error = %e, "failed to serialize response");
|
1108 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1089 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1109 1090 | }
|
1110 1091 | }
|
1111 1092 | }
|
1112 1093 | }
|
1113 1094 |
|
1114 1095 | ::pin_project_lite::pin_project! {
|
1115 1096 | /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
|
1116 1097 | /// [`StringPayloadInput`](crate::input::StringPayloadInput) using modelled bindings.
|
1117 1098 | pub struct StringPayloadInputFuture {
|
1118 - | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StringPayloadInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1099 + | inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StringPayloadInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
|
1119 1100 | }
|
1120 1101 | }
|
1121 1102 |
|
1122 1103 | impl std::future::Future for StringPayloadInputFuture {
|
1123 1104 | type Output = Result<
|
1124 1105 | crate::input::StringPayloadInput,
|
1125 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1106 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
|
1126 1107 | >;
|
1127 1108 |
|
1128 1109 | fn poll(
|
1129 1110 | self: std::pin::Pin<&mut Self>,
|
1130 1111 | cx: &mut std::task::Context<'_>,
|
1131 1112 | ) -> std::task::Poll<Self::Output> {
|
1132 1113 | let this = self.project();
|
1133 1114 | this.inner.as_mut().poll(cx)
|
1134 1115 | }
|
1135 1116 | }
|
1136 1117 |
|
1137 1118 | impl<B>
|
1138 - | ::aws_smithy_http_server::request::FromRequest<
|
1139 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1119 + | ::aws_smithy_legacy_http_server::request::FromRequest<
|
1120 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1140 1121 | B,
|
1141 1122 | > for crate::input::StringPayloadInput
|
1142 1123 | where
|
1143 - | B: ::aws_smithy_http_server::body::HttpBody + Send,
|
1124 + | B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
|
1144 1125 | B: 'static,
|
1145 1126 |
|
1146 1127 | B::Data: Send,
|
1147 - | ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1148 - | From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
|
1128 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
|
1129 + | From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
|
1149 1130 | {
|
1150 - | type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1131 + | type Rejection =
|
1132 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
|
1151 1133 | type Future = StringPayloadInputFuture;
|
1152 1134 |
|
1153 1135 | fn from_request(request: ::http::Request<B>) -> Self::Future {
|
1154 1136 | let fut = async move {
|
1155 - | if !::aws_smithy_http_server::protocol::accept_header_classifier(
|
1137 + | if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
|
1156 1138 | request.headers(),
|
1157 1139 | &crate::mimes::CONTENT_TYPE_TEXT_PLAIN,
|
1158 1140 | ) {
|
1159 - | return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1141 + | return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
|
1160 1142 | }
|
1161 1143 | crate::protocol_serde::shape_string_payload::de_string_payload_http_request(request)
|
1162 1144 | .await
|
1163 1145 | };
|
1164 1146 | use ::futures_util::future::TryFutureExt;
|
1165 - | let fut = fut.map_err(
|
1166 - | |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1167 - | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1168 - | ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
|
1169 - | e,
|
1170 - | )
|
1171 - | },
|
1172 - | );
|
1147 + | let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
|
1148 + | ::tracing::debug!(error = %e, "failed to deserialize request");
|
1149 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
|
1150 + | });
|
1173 1151 | StringPayloadInputFuture {
|
1174 1152 | inner: Box::pin(fut),
|
1175 1153 | }
|
1176 1154 | }
|
1177 1155 | }
|
1178 1156 | impl
|
1179 - | ::aws_smithy_http_server::response::IntoResponse<
|
1180 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1157 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1158 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1181 1159 | > for crate::output::StringPayloadOutput
|
1182 1160 | {
|
1183 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1161 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1184 1162 | match crate::protocol_serde::shape_string_payload::ser_string_payload_http_response(self) {
|
1185 1163 | Ok(response) => response,
|
1186 1164 | Err(e) => {
|
1187 1165 | ::tracing::error!(error = %e, "failed to serialize response");
|
1188 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1166 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1189 1167 | }
|
1190 1168 | }
|
1191 1169 | }
|
1192 1170 | }
|
1193 1171 | impl
|
1194 - | ::aws_smithy_http_server::response::IntoResponse<
|
1195 - | ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
|
1172 + | ::aws_smithy_legacy_http_server::response::IntoResponse<
|
1173 + | ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
|
1196 1174 | > for crate::error::StringPayloadError
|
1197 1175 | {
|
1198 - | fn into_response(self) -> ::aws_smithy_http_server::response::Response {
|
1176 + | fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
|
1199 1177 | match crate::protocol_serde::shape_string_payload::ser_string_payload_http_error(&self) {
|
1200 1178 | Ok(mut response) => {
|
1201 1179 | response.extensions_mut().insert(
|
1202 - | ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
|
1180 + | ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
|
1181 + | self.name(),
|
1182 + | ),
|
1203 1183 | );
|
1204 1184 | response
|
1205 1185 | }
|
1206 1186 | Err(e) => {
|
1207 1187 | ::tracing::error!(error = %e, "failed to serialize response");
|
1208 - | ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1188 + | ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
|
1209 1189 | }
|
1210 1190 | }
|
1211 1191 | }
|
1212 1192 | }
|