Loading codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerServiceGenerator.kt +7 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ import software.amazon.smithy.rust.codegen.core.rustlang.RustMetadata import software.amazon.smithy.rust.codegen.core.rustlang.RustModule import software.amazon.smithy.rust.codegen.core.rustlang.RustWriter import software.amazon.smithy.rust.codegen.core.rustlang.Visibility import software.amazon.smithy.rust.codegen.core.rustlang.rust import software.amazon.smithy.rust.codegen.core.smithy.CodegenContext import software.amazon.smithy.rust.codegen.core.smithy.RustCrate import software.amazon.smithy.rust.codegen.core.smithy.generators.protocol.ProtocolSupport Loading Loading @@ -40,6 +41,12 @@ open class ServerServiceGenerator( * which assigns a symbol location to each shape. */ fun render() { rustCrate.lib { val serviceName = codegenContext.serviceShape.id.name.toString() rust("##[doc(inline, hidden)]") rust("pub use crate::service::$serviceName;") } rustCrate.withModule(RustModule.operation(Visibility.PRIVATE)) { ServerProtocolTestGenerator(codegenContext, protocolSupport, protocolGenerator).render(this) } Loading Loading
codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerServiceGenerator.kt +7 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ import software.amazon.smithy.rust.codegen.core.rustlang.RustMetadata import software.amazon.smithy.rust.codegen.core.rustlang.RustModule import software.amazon.smithy.rust.codegen.core.rustlang.RustWriter import software.amazon.smithy.rust.codegen.core.rustlang.Visibility import software.amazon.smithy.rust.codegen.core.rustlang.rust import software.amazon.smithy.rust.codegen.core.smithy.CodegenContext import software.amazon.smithy.rust.codegen.core.smithy.RustCrate import software.amazon.smithy.rust.codegen.core.smithy.generators.protocol.ProtocolSupport Loading Loading @@ -40,6 +41,12 @@ open class ServerServiceGenerator( * which assigns a symbol location to each shape. */ fun render() { rustCrate.lib { val serviceName = codegenContext.serviceShape.id.name.toString() rust("##[doc(inline, hidden)]") rust("pub use crate::service::$serviceName;") } rustCrate.withModule(RustModule.operation(Visibility.PRIVATE)) { ServerProtocolTestGenerator(codegenContext, protocolSupport, protocolGenerator).render(this) } Loading