File tree Expand file tree Collapse file tree 7 files changed +37
-3
lines changed
tests/service_named_service Expand file tree Collapse file tree 7 files changed +37
-3
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ members = [
1414 # Tests
1515 " tests/included_service" ,
1616 " tests/same_name" ,
17+ " tests/service_named_service" ,
1718 " tests/wellknown" ,
1819 " tests/wellknown-compiled" ,
1920 " tests/extern_path/uuid" ,
Original file line number Diff line number Diff line change 1+ [package ]
2+ name = " service_named_service"
3+ version = " 0.1.0"
4+ authors = [" Lucio Franco <luciofranco14@gmail.com>" ]
5+ edition = " 2018"
6+ publish = false
7+ license = " MIT"
8+
9+ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
10+
11+ [dependencies ]
12+ tonic = { path = " ../../tonic" }
13+ prost = " 0.8"
14+
15+ [build-dependencies ]
16+ tonic-build = { path = " ../../tonic-build" }
Original file line number Diff line number Diff line change 1+ fn main ( ) {
2+ tonic_build:: compile_protos ( "proto/foo.proto" ) . unwrap ( ) ;
3+ }
Original file line number Diff line number Diff line change 1+ syntax = "proto3" ;
2+
3+ package foo ;
4+
5+ service Service {
6+ rpc Foo (stream FooRequest ) returns (stream FooResponse ) {}
7+ }
8+
9+ message FooRequest {}
10+
11+ message FooResponse {}
Original file line number Diff line number Diff line change 1+ pub mod pb {
2+ tonic:: include_proto!( "foo" ) ;
3+ }
Original file line number Diff line number Diff line change @@ -69,11 +69,11 @@ pub fn generate<T: Service>(
6969 pub fn with_interceptor<F >( inner: T , interceptor: F ) -> #service_ident<InterceptedService <T , F >>
7070 where
7171 F : FnMut ( tonic:: Request <( ) >) -> Result <tonic:: Request <( ) >, tonic:: Status >,
72- T : Service <
72+ T : tonic :: codegen :: Service <
7373 http:: Request <tonic:: body:: BoxBody >,
7474 Response = http:: Response <<T as tonic:: client:: GrpcService <tonic:: body:: BoxBody >>:: ResponseBody >
7575 >,
76- <T as Service <http:: Request <tonic:: body:: BoxBody >>>:: Error : Into <StdError > + Send + Sync ,
76+ <T as tonic :: codegen :: Service <http:: Request <tonic:: body:: BoxBody >>>:: Error : Into <StdError > + Send + Sync ,
7777 {
7878 #service_ident:: new( InterceptedService :: new( inner, interceptor) )
7979 }
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ pub fn generate<T: Service>(
112112 #configure_compression_methods
113113 }
114114
115- impl <T , B > Service <http:: Request <B >> for #server_service<T >
115+ impl <T , B > tonic :: codegen :: Service <http:: Request <B >> for #server_service<T >
116116 where
117117 T : #server_trait,
118118 B : Body + Send + Sync + ' static ,
You can’t perform that action at this time.
0 commit comments