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§
fn into_service_with_operation(self) -> ServiceWithOperation<Svc, E>
Provided Methods§
Sourcefn with_openapi(
self,
operation: OperationGenerator,
) -> ServiceWithOperation<Svc, E>where
Self: Sized,
fn with_openapi(
self,
operation: OperationGenerator,
) -> ServiceWithOperation<Svc, E>where
Self: Sized,
Add OpenAPI operation to service.