Trait rama::http::service::web::IntoEndpointService

pub trait IntoEndpointService<State, T>: Sealed<T> {
    // Required method
    fn into_endpoint_service(
        self,
    ) -> impl Service<State, Request<Body>, Response = Response<Body>, Error = Infallible>;
}
Expand description

utility trait to accept multiple types as an endpoint service for super::WebService

Required Methods§

fn into_endpoint_service( self, ) -> impl Service<State, Request<Body>, Response = Response<Body>, Error = Infallible>

convert the type into a rama_core::Service.

Object Safety§

This trait is not object safe.

Implementors§

§

impl<F, S, T> IntoEndpointService<S, (F, S, T)> for F
where F: EndpointServiceFn<S, T>, S: Clone + Send + Sync + 'static, T: Send + 'static,

§

impl<State, R> IntoEndpointService<State, ()> for R
where State: Clone + Send + Sync + 'static, R: IntoResponse + Clone + Send + Sync + 'static,

§

impl<State, S, R> IntoEndpointService<State, (State, R)> for S
where State: Clone + Send + Sync + 'static, S: Service<State, Request<Body>, Response = R, Error = Infallible>, R: IntoResponse + Send + Sync + 'static,