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§

source

fn with_openapi<F>(&mut self, info: OpenapiInfo, block: F)
where F: FnOnce(OpenapiRouter<'_, D>),

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, C, P> WithOpenapi<RouterBuilder<'a, C, P>> for RouterBuilder<'a, C, P>
where C: PipelineHandleChain<P> + Copy + Send + Sync + 'static, P: RefUnwindSafe + Send + Sync + 'static,

source§

fn with_openapi<F>(&mut self, info: OpenapiInfo, block: F)
where F: FnOnce(OpenapiRouter<'_, RouterBuilder<'a, C, P>>),

source§

impl<'a, C, P> WithOpenapi<ScopeBuilder<'a, C, P>> for ScopeBuilder<'a, C, P>
where C: PipelineHandleChain<P> + Copy + Send + Sync + 'static, P: RefUnwindSafe + Send + Sync + 'static,

source§

fn with_openapi<F>(&mut self, info: OpenapiInfo, block: F)
where F: FnOnce(OpenapiRouter<'_, ScopeBuilder<'a, C, P>>),

Implementors§