1 //! Generic server implementation. 2 //! 3 //! This module contains the low level components to build a gRPC server. It 4 //! provides a codec agnostic gRPC server handler. 5 //! 6 //! The items in this module are generally designed to be used by some codegen 7 //! tool that will provide the user some custom way to implement the server that 8 //! will implement the proper gRPC service. Thusly, they are a bit hard to use 9 //! by hand. 10 11 mod grpc; 12 mod service; 13 14 pub use self::grpc::Grpc; 15 pub use self::service::{ 16 ClientStreamingService, ServerStreamingService, StreamingService, UnaryService, 17 }; 18 19 /// A trait to provide a static reference to the service's 20 /// name. This is used for routing service's within the router. 21 pub trait NamedService { 22 /// The `Service-Name` as described [here]. 23 /// 24 /// [here]: https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests 25 const NAME: &'static str; 26 } 27