Inital commit

This commit is contained in:
Lucio Franco
2019-08-09 14:01:27 -04:00
commit b827fdd950
8 changed files with 192 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
[package]
name = "tonic"
version = "0.1.0"
authors = ["Lucio Franco <[email protected]>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
tower-grpc = { git = "https://github.com/tower-rs/tower-grpc", branch = "std-future" }
+14
View File
@@ -0,0 +1,14 @@
pub use tower_grpc::*;
use std::future::Future;
use std::pin::Pin;
pub type ResponseFuture<'a, T> = Pin<Box<dyn Future<Output = Result<T, Status>> + Send + 'a>>;
pub trait GrpcInnerService<Request> {
type Response;
fn call<'a>(&'a mut self, request: Request) -> ResponseFuture<'a, Self::Response>
where
Self: 'a;
}