Trait hrpc::server::MakeRoutes[][src]

pub trait MakeRoutes: Send + 'static {
    fn make_routes(&self) -> Routes;

    fn combine_with<Other>(self, other: Other) -> ServiceStack<Other, Self>
    where
        Other: MakeRoutes,
        Self: Sized
, { ... }
fn into_make_service(self) -> IntoMakeService<Self>
    where
        Self: Sized
, { ... }
fn layer<S, L>(self, layer: L) -> LayeredService<S, L, Self>
    where
        L: Layer<HrpcService, Service = S> + Clone + Sync + Send + 'static,
        S: Service<BoxRequest, Response = BoxResponse, Error = Infallible> + Send + 'static,
        S::Future: Send,
        Self: Sized
, { ... } }
Expand description

The core trait of hrpc-rs servers. This trait acts as a tower::MakeService, it can produce a set of Routes and can be combined with other MakeRoutess.

Not to be confused with tower::Service.

Required methods

Creates a Routes, which will be used to build a RoutesFinalized instance.

Provided methods

Combines this server with another server.

Turns this server into a type that implements MakeService, so that it can be used with hyper.

Layers this server with a layer.

If your layer does not implement Clone, you can wrap it using HrpcLayer::new.

Implementors