pub trait OpenApi: Sized {
// Required methods
fn meta() -> Vec<MetaApi>;
fn register(registry: &mut Registry);
fn add_routes(
self,
route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>>,
);
}
Expand description
Represents an OpenAPI object.
Required Methods§
Sourcefn add_routes(
self,
route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>>,
)
fn add_routes( self, route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>>, )
Adds all API endpoints to the routing object.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.