ServiceExt

Trait ServiceExt 

Source
pub trait ServiceExt<Svc, E>
where Svc: Service<Request, Error = E> + Clone + Send + 'static, Svc::Response: IntoResponse + 'static, Svc::Future: Send + 'static,
{ // Required method fn into_service_with_operation(self) -> ServiceWithOperation<Svc, E>; // Provided method fn with_openapi( self, operation: OperationGenerator, ) -> ServiceWithOperation<Svc, E> where Self: Sized { ... } }
Expand description

Trait for converting Service into wrapper.

Required Methods§

Provided Methods§

Source

fn with_openapi( self, operation: OperationGenerator, ) -> ServiceWithOperation<Svc, E>
where Self: Sized,

Add OpenAPI operation to service.

Implementors§

Source§

impl<Svc, E> ServiceExt<Svc, E> for ServiceWithOperation<Svc, E>
where Svc: Service<Request, Error = E> + Clone + Send + 'static, Svc::Response: IntoResponse + 'static, Svc::Future: Send + 'static,

Source§

impl<Svc, E> ServiceExt<Svc, E> for Svc
where Svc: Service<Request, Error = E> + Clone + Send + 'static, Svc::Response: IntoResponse + 'static, Svc::Future: Send + 'static,