diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerServiceGeneratorV2.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerServiceGeneratorV2.kt index 3b7d09c3ceaeee5f37509548c3fa9401dcaf95e3..f5f2cc49db1e9553d715acfee5f2282500a29b4d 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerServiceGeneratorV2.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerServiceGeneratorV2.kt @@ -129,14 +129,14 @@ class ServerServiceGeneratorV2( /// ## let app: $serviceName<#{SmithyHttpServer}::routing::Route<#{SmithyHttp}::body::SdkBody>> = app; /// ``` /// - pub fn $fieldName(self, handler: HandlerType) -> Self + pub fn $fieldName(self, handler: HandlerType) -> Self where - HandlerType: #{SmithyHttpServer}::operation::Handler, + HandlerType: #{SmithyHttpServer}::operation::Handler, #{SmithyHttpServer}::operation::Operation<#{SmithyHttpServer}::operation::IntoService>: #{SmithyHttpServer}::operation::Upgradable< #{Protocol}, crate::operation_shape::$structName, - Extensions, + ServiceExtractors, $builderBodyGenericTypeName, $builderPluginGenericTypeName, > @@ -151,12 +151,12 @@ class ServerServiceGeneratorV2( /// [`$structName`](crate::operation_shape::$structName) using either /// [`OperationShape::from_handler`](#{SmithyHttpServer}::operation::OperationShapeExt::from_handler) or /// [`OperationShape::from_service`](#{SmithyHttpServer}::operation::OperationShapeExt::from_service). - pub fn ${fieldName}_operation(mut self, operation: Operation) -> Self + pub fn ${fieldName}_operation(mut self, operation: Operation) -> Self where Operation: #{SmithyHttpServer}::operation::Upgradable< #{Protocol}, crate::operation_shape::$structName, - Extensions, + Extractors, $builderBodyGenericTypeName, $builderPluginGenericTypeName, > diff --git a/rust-runtime/aws-smithy-http-server/src/operation/upgrade.rs b/rust-runtime/aws-smithy-http-server/src/operation/upgrade.rs index 61e550ce84e5c86253e4ac128356622f4edd1277..42c4a5b26b7c41c15cdc8b8f8b95182d3870e26b 100644 --- a/rust-runtime/aws-smithy-http-server/src/operation/upgrade.rs +++ b/rust-runtime/aws-smithy-http-server/src/operation/upgrade.rs @@ -239,7 +239,8 @@ where Exts: FromParts

, // The signature of the inner service is correct - S: Service<(Op::Input, Exts), Response = Op::Output, Error = OperationError> + Clone, + Pl::Service: + Service<(Op::Input, Exts), Response = Op::Output, Error = OperationError> + Clone, // The plugin takes this operation as input Pl: Plugin,