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: Send + Sync + 'static, T: Send + 'static,

§

impl<State, F, Fut, R> IntoEndpointService<State, (State, F, Context<State>, Request<Body>, Fut, R)> for F
where State: Send + Sync + 'static, F: Fn(Context<State>, Request<Body>) -> Fut + Send + Sync + 'static, Fut: Future<Output = R> + Send + 'static, R: IntoResponse + Send + Sync + 'static,

§

impl<State, F, Fut, R> IntoEndpointService<State, (State, F, Context<State>, Fut, R)> for F
where State: Send + Sync + 'static, F: Fn(Context<State>) -> Fut + Send + Sync + 'static, Fut: Future<Output = R> + Send + 'static, R: IntoResponse + Send + Sync + 'static,

§

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

§

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