Trait gotham_restful::WithOpenapi
source · pub trait WithOpenapi<D> {
// Required method
fn with_openapi<F>(&mut self, info: OpenapiInfo, block: F)
where F: FnOnce(OpenapiRouter<'_, D>);
}
Expand description
This trait adds the with_openapi
method to gotham’s routing. It turns the default
router into one that will only allow RESTful resources, but record them and generate
an OpenAPI specification on request.
Required Methods§
fn with_openapi<F>(&mut self, info: OpenapiInfo, block: F)where
F: FnOnce(OpenapiRouter<'_, D>),
Object Safety§
This trait is not object safe.