rama_http::service::web

Trait IntoEndpointService

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

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

Required Methods§

Source

fn into_endpoint_service( self, ) -> impl Service<State, Request, Response = Response, 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§

Source§

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

Source§

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

Source§

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