pub trait Handler<T>:
Sealed
+ Clone
+ Send
+ Sync
+ Sized
+ 'static {
type Future: Future<Output = Response> + Send + 'static;
// Required methods
fn call(self, req: Request) -> Self::Future;
fn update_operation(op: &mut Operation);
fn register_components(spec: &mut OpenApiSpec);
}Expand description
Trait representing an async handler function
Required Associated Types§
Required Methods§
Sourcefn update_operation(op: &mut Operation)
fn update_operation(op: &mut Operation)
Update the OpenAPI operation
Sourcefn register_components(spec: &mut OpenApiSpec)
fn register_components(spec: &mut OpenApiSpec)
Register any OpenAPI components referenced by this handler.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".