RouterTonicExt

Trait RouterTonicExt 

Source
pub trait RouterTonicExt: Sealed {
    // Required method
    fn from_tonic_service<S>(service: S) -> Self
       where Self: Sized,
             S: Service<Request<Body>, Response = Response<BoxBody>, Error = Infallible> + NamedService + Clone + Send + 'static,
             S::Future: Send + 'static;
}
Expand description

Takes Tonic Service and converts it into Router

Required Methods§

Source

fn from_tonic_service<S>(service: S) -> Self
where Self: Sized, S: Service<Request<Body>, Response = Response<BoxBody>, Error = Infallible> + NamedService + Clone + Send + 'static, S::Future: Send + 'static,

Takes Tonic Service and converts it into Router

Implementations on Foreign Types§

Source§

impl RouterTonicExt for Router

Source§

fn from_tonic_service<S>(service: S) -> Self
where Self: Sized, S: Service<Request<Body>, Response = Response<BoxBody>, Error = Infallible> + NamedService + Clone + Send + 'static, S::Future: Send + 'static,

Implementors§