Skip to main content

IntoEndpointService

Trait IntoEndpointService 

pub trait IntoEndpointService<T>: Sealed<T, ()> {
    type Service: Service<Request>;

    // Required method
    fn into_endpoint_service(self) -> Self::Service;
}
Available on crate feature http only.
Expand description

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

Required Associated Types§

Required Methods§

fn into_endpoint_service(self) -> Self::Service

convert the type into a rama_core::Service.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

§

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

§

impl<O> IntoEndpointService<()> for Result<O, Infallible>
where O: Clone + Send + Sync + 'static,

§

impl<O> IntoEndpointService<Response> for O
where O: IntoResponse + Clone + Send + Sync + 'static,

§

impl<S> IntoEndpointService<(S,)> for S
where S: Service<Request>,

§

type Service = S