Server Test

Server Test

rev. b0deb0ffbc7c5574d778848fd7fb7baea5d1724c (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-server-test/rpcv2Cbor/rust-server-codegen/src/operation.rs

@@ -24,24 +86,84 @@
   44     44   
    type Future = Float16InputFuture;
   45     45   
   46     46   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
   47     47   
        let fut = async move {
   48     48   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
   49     49   
                request.headers(),
   50     50   
                &CONTENT_TYPE_FLOAT16,
   51     51   
            ) {
   52     52   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
   53     53   
            }
   54         -
            crate::protocol_serde::shape_float16::de_float16_http_request(request)
   55         -
                .await
   56         -
                .map_err(Into::into)
          54  +
            crate::protocol_serde::shape_float16::de_float16_http_request(request).await
   57     55   
        };
   58     56   
        use ::futures_util::future::TryFutureExt;
   59     57   
        let fut = fut.map_err(
   60     58   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
   61     59   
                ::tracing::debug!(error = %e, "failed to deserialize request");
   62     60   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
   63     61   
                    e,
   64     62   
                )
   65     63   
            },
   66     64   
        );
@@ -113,111 +173,170 @@
  133    131   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  134    132   
        let fut = async move {
  135    133   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  136    134   
                request.headers(),
  137    135   
                &CONTENT_TYPE_SPARSENULLSOPERATION,
  138    136   
            ) {
  139    137   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
  140    138   
            }
  141    139   
            crate::protocol_serde::shape_sparse_nulls_operation::de_sparse_nulls_operation_http_request(request)
  142    140   
                            .await
  143         -
                            .map_err(Into::into)
  144    141   
        };
  145    142   
        use ::futures_util::future::TryFutureExt;
  146    143   
        let fut = fut.map_err(
  147    144   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
  148    145   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  149    146   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
  150    147   
                    e,
  151    148   
                )
  152    149   
            },
  153    150   
        );
@@ -387,384 +447,443 @@
  407    404   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  408    405   
        let fut = async move {
  409    406   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  410    407   
                request.headers(),
  411    408   
                &CONTENT_TYPE_OPERATIONWITHDEFAULTS,
  412    409   
            ) {
  413    410   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
  414    411   
            }
  415    412   
            crate::protocol_serde::shape_operation_with_defaults::de_operation_with_defaults_http_request(request)
  416    413   
                            .await
  417         -
                            .map_err(Into::into)
  418    414   
        };
  419    415   
        use ::futures_util::future::TryFutureExt;
  420    416   
        let fut = fut.map_err(
  421    417   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
  422    418   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  423    419   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
  424    420   
                    e,
  425    421   
                )
  426    422   
            },
  427    423   
        );
@@ -664,660 +724,719 @@
  684    680   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  685    681   
                request.headers(),
  686    682   
                &CONTENT_TYPE_FRACTIONALSECONDS,
  687    683   
            ) {
  688    684   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
  689    685   
            }
  690    686   
            crate::protocol_serde::shape_fractional_seconds::de_fractional_seconds_http_request(
  691    687   
                request,
  692    688   
            )
  693    689   
            .await
  694         -
            .map_err(Into::into)
  695    690   
        };
  696    691   
        use ::futures_util::future::TryFutureExt;
  697    692   
        let fut = fut.map_err(
  698    693   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
  699    694   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  700    695   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
  701    696   
                    e,
  702    697   
                )
  703    698   
            },
  704    699   
        );
@@ -755,750 +815,809 @@
  775    770   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  776    771   
                request.headers(),
  777    772   
                &CONTENT_TYPE_GREETINGWITHERRORS,
  778    773   
            ) {
  779    774   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
  780    775   
            }
  781    776   
            crate::protocol_serde::shape_greeting_with_errors::de_greeting_with_errors_http_request(
  782    777   
                request,
  783    778   
            )
  784    779   
            .await
  785         -
            .map_err(Into::into)
  786    780   
        };
  787    781   
        use ::futures_util::future::TryFutureExt;
  788    782   
        let fut = fut.map_err(
  789    783   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
  790    784   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  791    785   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
  792    786   
                    e,
  793    787   
                )
  794    788   
            },
  795    789   
        );
@@ -966,960 +1026,1019 @@
  986    980   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  987    981   
        let fut = async move {
  988    982   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  989    983   
                request.headers(),
  990    984   
                &CONTENT_TYPE_RECURSIVESHAPES,
  991    985   
            ) {
  992    986   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
  993    987   
            }
  994    988   
            crate::protocol_serde::shape_recursive_shapes::de_recursive_shapes_http_request(request)
  995    989   
                .await
  996         -
                .map_err(Into::into)
  997    990   
        };
  998    991   
        use ::futures_util::future::TryFutureExt;
  999    992   
        let fut = fut.map_err(
 1000    993   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
 1001    994   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 1002    995   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
 1003    996   
                    e,
 1004    997   
                )
 1005    998   
            },
 1006    999   
        );
@@ -1210,1203 +1270,1262 @@
 1230   1223   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
 1231   1224   
        let fut = async move {
 1232   1225   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 1233   1226   
                request.headers(),
 1234   1227   
                &CONTENT_TYPE_RPCV2CBORSPARSEMAPS,
 1235   1228   
            ) {
 1236   1229   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
 1237   1230   
            }
 1238   1231   
            crate::protocol_serde::shape_rpc_v2_cbor_sparse_maps::de_rpc_v2_cbor_sparse_maps_http_request(request)
 1239   1232   
                            .await
 1240         -
                            .map_err(Into::into)
 1241   1233   
        };
 1242   1234   
        use ::futures_util::future::TryFutureExt;
 1243   1235   
        let fut = fut.map_err(
 1244   1236   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
 1245   1237   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 1246   1238   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
 1247   1239   
                    e,
 1248   1240   
                )
 1249   1241   
            },
 1250   1242   
        );
@@ -1939,1931 +1999,1990 @@
 1959   1951   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
 1960   1952   
        let fut = async move {
 1961   1953   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 1962   1954   
                request.headers(),
 1963   1955   
                &CONTENT_TYPE_RPCV2CBORDENSEMAPS,
 1964   1956   
            ) {
 1965   1957   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
 1966   1958   
            }
 1967   1959   
            crate::protocol_serde::shape_rpc_v2_cbor_dense_maps::de_rpc_v2_cbor_dense_maps_http_request(request)
 1968   1960   
                            .await
 1969         -
                            .map_err(Into::into)
 1970   1961   
        };
 1971   1962   
        use ::futures_util::future::TryFutureExt;
 1972   1963   
        let fut = fut.map_err(
 1973   1964   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
 1974   1965   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 1975   1966   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
 1976   1967   
                    e,
 1977   1968   
                )
 1978   1969   
            },
 1979   1970   
        );
@@ -2408,2399 +2468,2458 @@
 2428   2419   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 2429   2420   
                request.headers(),
 2430   2421   
                &CONTENT_TYPE_RPCV2CBORLISTS,
 2431   2422   
            ) {
 2432   2423   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
 2433   2424   
            }
 2434   2425   
            crate::protocol_serde::shape_rpc_v2_cbor_lists::de_rpc_v2_cbor_lists_http_request(
 2435   2426   
                request,
 2436   2427   
            )
 2437   2428   
            .await
 2438         -
            .map_err(Into::into)
 2439   2429   
        };
 2440   2430   
        use ::futures_util::future::TryFutureExt;
 2441   2431   
        let fut = fut.map_err(
 2442   2432   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
 2443   2433   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 2444   2434   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
 2445   2435   
                    e,
 2446   2436   
                )
 2447   2437   
            },
 2448   2438   
        );
@@ -3018,3008 +3078,3067 @@
 3038   3028   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
 3039   3029   
        let fut = async move {
 3040   3030   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 3041   3031   
                request.headers(),
 3042   3032   
                &CONTENT_TYPE_SIMPLESCALARPROPERTIES,
 3043   3033   
            ) {
 3044   3034   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
 3045   3035   
            }
 3046   3036   
            crate::protocol_serde::shape_simple_scalar_properties::de_simple_scalar_properties_http_request(request)
 3047   3037   
                            .await
 3048         -
                            .map_err(Into::into)
 3049   3038   
        };
 3050   3039   
        use ::futures_util::future::TryFutureExt;
 3051   3040   
        let fut = fut.map_err(
 3052   3041   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
 3053   3042   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 3054   3043   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
 3055   3044   
                    e,
 3056   3045   
                )
 3057   3046   
            },
 3058   3047   
        );
@@ -4714,4703 +4774,4762 @@
 4734   4723   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
 4735   4724   
        let fut = async move {
 4736   4725   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 4737   4726   
                request.headers(),
 4738   4727   
                &CONTENT_TYPE_OPTIONALINPUTOUTPUT,
 4739   4728   
            ) {
 4740   4729   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
 4741   4730   
            }
 4742   4731   
            crate::protocol_serde::shape_optional_input_output::de_optional_input_output_http_request(request)
 4743   4732   
                            .await
 4744         -
                            .map_err(Into::into)
 4745   4733   
        };
 4746   4734   
        use ::futures_util::future::TryFutureExt;
 4747   4735   
        let fut = fut.map_err(
 4748   4736   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
 4749   4737   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 4750   4738   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
 4751   4739   
                    e,
 4752   4740   
                )
 4753   4741   
            },
 4754   4742   
        );
@@ -4891,4879 +4951,4938 @@
 4911   4899   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
 4912   4900   
                request.headers(),
 4913   4901   
                &CONTENT_TYPE_EMPTYINPUTOUTPUT,
 4914   4902   
            ) {
 4915   4903   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
 4916   4904   
            }
 4917   4905   
            crate::protocol_serde::shape_empty_input_output::de_empty_input_output_http_request(
 4918   4906   
                request,
 4919   4907   
            )
 4920   4908   
            .await
 4921         -
            .map_err(Into::into)
 4922   4909   
        };
 4923   4910   
        use ::futures_util::future::TryFutureExt;
 4924   4911   
        let fut = fut.map_err(
 4925   4912   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
 4926   4913   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 4927   4914   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
 4928   4915   
                    e,
 4929   4916   
                )
 4930   4917   
            },
 4931   4918   
        );
@@ -5145,5132 +5205,5191 @@
 5165   5152   
    ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection:
 5166   5153   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
 5167   5154   
{
 5168   5155   
    type Rejection = ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError;
 5169   5156   
    type Future = NoInputOutputInputFuture;
 5170   5157   
 5171   5158   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
 5172   5159   
        let fut = async move {
 5173   5160   
            crate::protocol_serde::shape_no_input_output::de_no_input_output_http_request(request)
 5174   5161   
                .await
 5175         -
                .map_err(Into::into)
 5176   5162   
        };
 5177   5163   
        use ::futures_util::future::TryFutureExt;
 5178   5164   
        let fut = fut.map_err(
 5179   5165   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
 5180   5166   
                ::tracing::debug!(error = %e, "failed to deserialize request");
 5181   5167   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
 5182   5168   
                    e,
 5183   5169   
                )
 5184   5170   
            },
 5185   5171   
        );

tmp-codegen-diff/codegen-server-test/rpcv2Cbor_extras/rust-server-codegen/src/operation.rs

@@ -27,27 +87,86 @@
   47     47   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
   48     48   
        let fut = async move {
   49     49   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
   50     50   
                request.headers(),
   51     51   
                &CONTENT_TYPE_RECURSIVEUNIONOPERATION,
   52     52   
            ) {
   53     53   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
   54     54   
            }
   55     55   
            crate::protocol_serde::shape_recursive_union_operation::de_recursive_union_operation_http_request(request)
   56     56   
                            .await
   57         -
                            .map_err(Into::into)
   58     57   
        };
   59     58   
        use ::futures_util::future::TryFutureExt;
   60     59   
        let fut = fut.map_err(
   61     60   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
   62     61   
                ::tracing::debug!(error = %e, "failed to deserialize request");
   63     62   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
   64     63   
                    e,
   65     64   
                )
   66     65   
            },
   67     66   
        );
@@ -262,261 +322,320 @@
  282    281   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  283    282   
        let fut = async move {
  284    283   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  285    284   
                request.headers(),
  286    285   
                &CONTENT_TYPE_SINGLEMEMBERSTRUCTOPERATION,
  287    286   
            ) {
  288    287   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
  289    288   
            }
  290    289   
            crate::protocol_serde::shape_single_member_struct_operation::de_single_member_struct_operation_http_request(request)
  291    290   
                            .await
  292         -
                            .map_err(Into::into)
  293    291   
        };
  294    292   
        use ::futures_util::future::TryFutureExt;
  295    293   
        let fut = fut.map_err(
  296    294   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
  297    295   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  298    296   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
  299    297   
                    e,
  300    298   
                )
  301    299   
            },
  302    300   
        );
@@ -406,404 +466,463 @@
  426    424   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  427    425   
        let fut = async move {
  428    426   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  429    427   
                request.headers(),
  430    428   
                &CONTENT_TYPE_EMPTYSTRUCTOPERATION,
  431    429   
            ) {
  432    430   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
  433    431   
            }
  434    432   
            crate::protocol_serde::shape_empty_struct_operation::de_empty_struct_operation_http_request(request)
  435    433   
                            .await
  436         -
                            .map_err(Into::into)
  437    434   
        };
  438    435   
        use ::futures_util::future::TryFutureExt;
  439    436   
        let fut = fut.map_err(
  440    437   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
  441    438   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  442    439   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
  443    440   
                    e,
  444    441   
                )
  445    442   
            },
  446    443   
        );
@@ -551,548 +611,607 @@
  571    568   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  572    569   
        let fut = async move {
  573    570   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  574    571   
                request.headers(),
  575    572   
                &CONTENT_TYPE_COMPLEXSTRUCTOPERATION,
  576    573   
            ) {
  577    574   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
  578    575   
            }
  579    576   
            crate::protocol_serde::shape_complex_struct_operation::de_complex_struct_operation_http_request(request)
  580    577   
                            .await
  581         -
                            .map_err(Into::into)
  582    578   
        };
  583    579   
        use ::futures_util::future::TryFutureExt;
  584    580   
        let fut = fut.map_err(
  585    581   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
  586    582   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  587    583   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
  588    584   
                    e,
  589    585   
                )
  590    586   
            },
  591    587   
        );
@@ -656,652 +716,711 @@
  676    672   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  677    673   
        let fut = async move {
  678    674   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  679    675   
                request.headers(),
  680    676   
                &CONTENT_TYPE_ERRORSERIALIZATIONOPERATION,
  681    677   
            ) {
  682    678   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
  683    679   
            }
  684    680   
            crate::protocol_serde::shape_error_serialization_operation::de_error_serialization_operation_http_request(request)
  685    681   
                            .await
  686         -
                            .map_err(Into::into)
  687    682   
        };
  688    683   
        use ::futures_util::future::TryFutureExt;
  689    684   
        let fut = fut.map_err(
  690    685   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
  691    686   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  692    687   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
  693    688   
                    e,
  694    689   
                )
  695    690   
            },
  696    691   
        );
@@ -845,840 +905,899 @@
  865    860   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  866    861   
        let fut = async move {
  867    862   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  868    863   
                request.headers(),
  869    864   
                &CONTENT_TYPE_SIMPLESTRUCTOPERATION,
  870    865   
            ) {
  871    866   
                return Err(::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection::NotAcceptable);
  872    867   
            }
  873    868   
            crate::protocol_serde::shape_simple_struct_operation::de_simple_struct_operation_http_request(request)
  874    869   
                            .await
  875         -
                            .map_err(Into::into)
  876    870   
        };
  877    871   
        use ::futures_util::future::TryFutureExt;
  878    872   
        let fut = fut.map_err(
  879    873   
            |e: ::aws_smithy_http_server::protocol::rpc_v2_cbor::rejection::RequestRejection| {
  880    874   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  881    875   
                ::aws_smithy_http_server::protocol::rpc_v2_cbor::runtime_error::RuntimeError::from(
  882    876   
                    e,
  883    877   
                )
  884    878   
            },
  885    879   
        );

tmp-codegen-diff/codegen-server-test/s3/rust-server-codegen/src/operation.rs

@@ -14,14 +76,74 @@
   34     34   
   35     35   
    B::Data: Send,
   36     36   
    ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection:
   37     37   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   38     38   
{
   39     39   
    type Rejection = ::aws_smithy_http_server::protocol::rest_xml::runtime_error::RuntimeError;
   40     40   
    type Future = GetObjectInputFuture;
   41     41   
   42     42   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
   43     43   
        let fut = async move {
   44         -
            crate::protocol_serde::shape_get_object::de_get_object_http_request(request)
   45         -
                .await
   46         -
                .map_err(Into::into)
          44  +
            crate::protocol_serde::shape_get_object::de_get_object_http_request(request).await
   47     45   
        };
   48     46   
        use ::futures_util::future::TryFutureExt;
   49     47   
        let fut = fut.map_err(
   50     48   
            |e: ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection| {
   51     49   
                ::tracing::debug!(error = %e, "failed to deserialize request");
   52     50   
                ::aws_smithy_http_server::protocol::rest_xml::runtime_error::RuntimeError::from(e)
   53     51   
            },
   54     52   
        );
   55     53   
        GetObjectInputFuture {
   56     54   
            inner: Box::pin(fut),
@@ -121,119 +181,178 @@
  141    139   
    ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection:
  142    140   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
  143    141   
{
  144    142   
    type Rejection = ::aws_smithy_http_server::protocol::rest_xml::runtime_error::RuntimeError;
  145    143   
    type Future = DeleteObjectTaggingInputFuture;
  146    144   
  147    145   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  148    146   
        let fut = async move {
  149    147   
            crate::protocol_serde::shape_delete_object_tagging::de_delete_object_tagging_http_request(request)
  150    148   
                            .await
  151         -
                            .map_err(Into::into)
  152    149   
        };
  153    150   
        use ::futures_util::future::TryFutureExt;
  154    151   
        let fut = fut.map_err(
  155    152   
            |e: ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection| {
  156    153   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  157    154   
                ::aws_smithy_http_server::protocol::rest_xml::runtime_error::RuntimeError::from(e)
  158    155   
            },
  159    156   
        );
  160    157   
        DeleteObjectTaggingInputFuture {
  161    158   
            inner: Box::pin(fut),
@@ -226,223 +286,282 @@
  246    243   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  247    244   
                request.headers(),
  248    245   
                &CONTENT_TYPE_GETBUCKETLOCATION,
  249    246   
            ) {
  250    247   
                return Err(::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection::NotAcceptable);
  251    248   
            }
  252    249   
            crate::protocol_serde::shape_get_bucket_location::de_get_bucket_location_http_request(
  253    250   
                request,
  254    251   
            )
  255    252   
            .await
  256         -
            .map_err(Into::into)
  257    253   
        };
  258    254   
        use ::futures_util::future::TryFutureExt;
  259    255   
        let fut = fut.map_err(
  260    256   
            |e: ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection| {
  261    257   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  262    258   
                ::aws_smithy_http_server::protocol::rest_xml::runtime_error::RuntimeError::from(e)
  263    259   
            },
  264    260   
        );
  265    261   
        GetBucketLocationInputFuture {
  266    262   
            inner: Box::pin(fut),
@@ -373,369 +433,428 @@
  393    389   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  394    390   
        let fut = async move {
  395    391   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  396    392   
                request.headers(),
  397    393   
                &CONTENT_TYPE_LISTOBJECTSV2,
  398    394   
            ) {
  399    395   
                return Err(::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection::NotAcceptable);
  400    396   
            }
  401    397   
            crate::protocol_serde::shape_list_objects_v2::de_list_objects_v2_http_request(request)
  402    398   
                .await
  403         -
                .map_err(Into::into)
  404    399   
        };
  405    400   
        use ::futures_util::future::TryFutureExt;
  406    401   
        let fut = fut.map_err(
  407    402   
            |e: ::aws_smithy_http_server::protocol::rest_xml::rejection::RequestRejection| {
  408    403   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  409    404   
                ::aws_smithy_http_server::protocol::rest_xml::runtime_error::RuntimeError::from(e)
  410    405   
            },
  411    406   
        );
  412    407   
        ListObjectsV2InputFuture {
  413    408   
            inner: Box::pin(fut),

tmp-codegen-diff/codegen-server-test/simple/rust-server-codegen/src/operation.rs

@@ -20,20 +82,80 @@
   40     40   
    type Future = OperationInputFuture;
   41     41   
   42     42   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
   43     43   
        let fut = async move {
   44     44   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
   45     45   
                request.headers(),
   46     46   
                &CONTENT_TYPE_OPERATION,
   47     47   
            ) {
   48     48   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
   49     49   
            }
   50         -
            crate::protocol_serde::shape_operation::de_operation_http_request(request)
   51         -
                .await
   52         -
                .map_err(Into::into)
          50  +
            crate::protocol_serde::shape_operation::de_operation_http_request(request).await
   53     51   
        };
   54     52   
        use ::futures_util::future::TryFutureExt;
   55     53   
        let fut = fut.map_err(
   56     54   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
   57     55   
                ::tracing::debug!(error = %e, "failed to deserialize request");
   58     56   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
   59     57   
                    e,
   60     58   
                )
   61     59   
            },
   62     60   
        );

tmp-codegen-diff/codegen-server-test/unique_items/rust-server-codegen/src/operation.rs

@@ -22,22 +82,81 @@
   42     42   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
   43     43   
        let fut = async move {
   44     44   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
   45     45   
                request.headers(),
   46     46   
                &CONTENT_TYPE_MALFORMEDUNIQUEITEMS,
   47     47   
            ) {
   48     48   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
   49     49   
            }
   50     50   
            crate::protocol_serde::shape_malformed_unique_items::de_malformed_unique_items_http_request(request)
   51     51   
                            .await
   52         -
                            .map_err(Into::into)
   53     52   
        };
   54     53   
        use ::futures_util::future::TryFutureExt;
   55     54   
        let fut = fut.map_err(
   56     55   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
   57     56   
                ::tracing::debug!(error = %e, "failed to deserialize request");
   58     57   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
   59     58   
                    e,
   60     59   
                )
   61     60   
            },
   62     61   
        );