IntoEndpointServiceWithState

Trait IntoEndpointServiceWithState 

pub trait IntoEndpointServiceWithState<T, State>: Sealed<T, State> {
    // Required method
    fn into_endpoint_service_with_state(
        self,
        state: State,
    ) -> impl Service<Request, Response = Response, Error = Infallible>;
}

Required Methods§

fn into_endpoint_service_with_state( self, state: State, ) -> impl Service<Request, Response = Response, Error = Infallible>

convert the type into a rama_core::Service with state.

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, State> IntoEndpointServiceWithState<(F, T), State> for F
where F: EndpointServiceFn<T, State>, T: Send + 'static, State: Send + Sync + Clone + 'static,

§

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

§

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