Trait IntoEndpointService

pub trait IntoEndpointService<T>: Sealed<T> {
    // Required method
    fn into_endpoint_service(
        self,
    ) -> impl Service<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<Request<Body>, Response = Response<Body>, Error = Infallible>

convert the type into a rama_core::Service.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

§

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

§

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

§

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