Skip to main content

IntoEndpointService

Trait IntoEndpointService 

pub trait IntoEndpointService<T>: Sealed<T, ()> {
    type Service: Service<Request, Output = Response, Error = Infallible>;

    // Required method
    fn into_endpoint_service(self) -> Self::Service;
}
Expand description

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

Required Associated Types§

type Service: Service<Request, Output = Response, Error = Infallible>

Required Methods§

fn into_endpoint_service(self) -> Self::Service

convert the type into a rama_core::Service.

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, Output = R, Error = Infallible>, R: IntoResponse + Send + Sync + 'static,