Skip to main content

IntoService

Trait IntoService 

Source
pub trait IntoService<S, St, Req>
where S: Service<St, Req>,
{ // Required method fn into_service(self) -> S; }
Expand description

Trait for types that can be converted to a Service

Required Methods§

Source

fn into_service(self) -> S

Convert to a Service

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<F, St, Req, Res, Err> IntoService<FnService<F, Req, Res, Err>, St, Req> for F
where F: AsyncFn(Req) -> Result<Res, Err>,

Source§

impl<F, St, Req, Res, Err> IntoService<FnServiceSt<F, St, Req, Res, Err>, St, Req> for F
where F: AsyncFn(&St, Req) -> Result<Res, Err>,

Source§

impl<S, St, Req> IntoService<S, St, Req> for S
where S: Service<St, Req>,