More async macro
This commit is contained in:
+3
-3
@@ -2,13 +2,13 @@ pub use tower_grpc::*;
|
||||
|
||||
use std::future::Future;
|
||||
use std::pin::Pin;
|
||||
use std::sync::Arc;
|
||||
|
||||
pub type ResponseFuture<'a, T> = Pin<Box<dyn Future<Output = Result<T, Status>> + Send + 'a>>;
|
||||
|
||||
pub trait GrpcInnerService<Request> {
|
||||
type Response;
|
||||
type Future: Future<Output = Result<Self::Response, Status>>;
|
||||
|
||||
fn call<'a>(&'a mut self, request: Request) -> ResponseFuture<'a, Self::Response>
|
||||
where
|
||||
Self: 'a;
|
||||
fn call(self: Arc<Self>, request: Request) -> Self::Future;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user