Trait axum_tonic::NestTonic

source ·
pub trait NestTonic: Sized {
    // Required method
    fn nest_tonic<S>(self, svc: S) -> Self
       where S: Service<Request<Body>, Error = Infallible, Response = Response<BoxBody>> + Clone + Send + 'static + NamedService,
             S::Future: Send + 'static + Unpin;
}
Expand description

This trait automatically nests the NamedService at the correct path.

Required Methods§

source

fn nest_tonic<S>(self, svc: S) -> Self
where S: Service<Request<Body>, Error = Infallible, Response = Response<BoxBody>> + Clone + Send + 'static + NamedService, S::Future: Send + 'static + Unpin,

Nest a tonic-service at the root path of this router.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl NestTonic for Router

source§

fn nest_tonic<S>(self, svc: S) -> Self
where S: Service<Request<Body>, Error = Infallible, Response = Response<BoxBody>> + Clone + Send + 'static + NamedService, S::Future: Send + 'static + Unpin,

Implementors§