Trait poem_openapi::OpenApi

source ·
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 a OpenAPI object.

Required Methods§

source

fn meta() -> Vec<MetaApi>

Gets metadata of this API object.

source

fn register(registry: &mut Registry)

Register some types to the registry.

source

fn add_routes( self, route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>> )

Adds all API endpoints to the routing object.

Implementations on Foreign Types§

source§

impl<T1: OpenApi, T2: OpenApi, T3: OpenApi, T4: OpenApi, T5: OpenApi, T6: OpenApi> OpenApi for (T1, T2, T3, T4, T5, T6)

source§

fn meta() -> Vec<MetaApi>

source§

fn register(registry: &mut Registry)

source§

fn add_routes( self, route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>> )

source§

impl<T1: OpenApi, T2: OpenApi, T3: OpenApi> OpenApi for (T1, T2, T3)

source§

fn meta() -> Vec<MetaApi>

source§

fn register(registry: &mut Registry)

source§

fn add_routes( self, route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>> )

source§

impl<T1: OpenApi, T2: OpenApi, T3: OpenApi, T4: OpenApi, T5: OpenApi, T6: OpenApi, T7: OpenApi, T8: OpenApi, T9: OpenApi, T10: OpenApi, T11: OpenApi, T12: OpenApi> OpenApi for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)

source§

fn meta() -> Vec<MetaApi>

source§

fn register(registry: &mut Registry)

source§

fn add_routes( self, route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>> )

source§

impl<T1: OpenApi, T2: OpenApi, T3: OpenApi, T4: OpenApi, T5: OpenApi, T6: OpenApi, T7: OpenApi, T8: OpenApi> OpenApi for (T1, T2, T3, T4, T5, T6, T7, T8)

source§

fn meta() -> Vec<MetaApi>

source§

fn register(registry: &mut Registry)

source§

fn add_routes( self, route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>> )

source§

impl<T1: OpenApi, T2: OpenApi> OpenApi for (T1, T2)

source§

fn meta() -> Vec<MetaApi>

source§

fn register(registry: &mut Registry)

source§

fn add_routes( self, route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>> )

source§

impl<T1: OpenApi, T2: OpenApi, T3: OpenApi, T4: OpenApi, T5: OpenApi, T6: OpenApi, T7: OpenApi, T8: OpenApi, T9: OpenApi, T10: OpenApi, T11: OpenApi, T12: OpenApi, T13: OpenApi, T14: OpenApi, T15: OpenApi> OpenApi for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)

source§

fn meta() -> Vec<MetaApi>

source§

fn register(registry: &mut Registry)

source§

fn add_routes( self, route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>> )

source§

impl<T1: OpenApi, T2: OpenApi, T3: OpenApi, T4: OpenApi, T5: OpenApi, T6: OpenApi, T7: OpenApi, T8: OpenApi, T9: OpenApi, T10: OpenApi> OpenApi for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

source§

fn meta() -> Vec<MetaApi>

source§

fn register(registry: &mut Registry)

source§

fn add_routes( self, route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>> )

source§

impl<T1: OpenApi, T2: OpenApi, T3: OpenApi, T4: OpenApi> OpenApi for (T1, T2, T3, T4)

source§

fn meta() -> Vec<MetaApi>

source§

fn register(registry: &mut Registry)

source§

fn add_routes( self, route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>> )

source§

impl<T1: OpenApi, T2: OpenApi, T3: OpenApi, T4: OpenApi, T5: OpenApi, T6: OpenApi, T7: OpenApi> OpenApi for (T1, T2, T3, T4, T5, T6, T7)

source§

fn meta() -> Vec<MetaApi>

source§

fn register(registry: &mut Registry)

source§

fn add_routes( self, route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>> )

source§

impl<T1: OpenApi, T2: OpenApi, T3: OpenApi, T4: OpenApi, T5: OpenApi, T6: OpenApi, T7: OpenApi, T8: OpenApi, T9: OpenApi, T10: OpenApi, T11: OpenApi, T12: OpenApi, T13: OpenApi, T14: OpenApi, T15: OpenApi, T16: OpenApi> OpenApi for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)

source§

fn meta() -> Vec<MetaApi>

source§

fn register(registry: &mut Registry)

source§

fn add_routes( self, route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>> )

source§

impl<T1: OpenApi, T2: OpenApi, T3: OpenApi, T4: OpenApi, T5: OpenApi, T6: OpenApi, T7: OpenApi, T8: OpenApi, T9: OpenApi, T10: OpenApi, T11: OpenApi> OpenApi for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

source§

fn meta() -> Vec<MetaApi>

source§

fn register(registry: &mut Registry)

source§

fn add_routes( self, route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>> )

source§

impl<T1: OpenApi, T2: OpenApi, T3: OpenApi, T4: OpenApi, T5: OpenApi, T6: OpenApi, T7: OpenApi, T8: OpenApi, T9: OpenApi, T10: OpenApi, T11: OpenApi, T12: OpenApi, T13: OpenApi> OpenApi for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)

source§

fn meta() -> Vec<MetaApi>

source§

fn register(registry: &mut Registry)

source§

fn add_routes( self, route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>> )

source§

impl<T1: OpenApi, T2: OpenApi, T3: OpenApi, T4: OpenApi, T5: OpenApi> OpenApi for (T1, T2, T3, T4, T5)

source§

fn meta() -> Vec<MetaApi>

source§

fn register(registry: &mut Registry)

source§

fn add_routes( self, route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>> )

source§

impl<T1: OpenApi, T2: OpenApi, T3: OpenApi, T4: OpenApi, T5: OpenApi, T6: OpenApi, T7: OpenApi, T8: OpenApi, T9: OpenApi, T10: OpenApi, T11: OpenApi, T12: OpenApi, T13: OpenApi, T14: OpenApi> OpenApi for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)

source§

fn meta() -> Vec<MetaApi>

source§

fn register(registry: &mut Registry)

source§

fn add_routes( self, route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>> )

source§

impl OpenApi for ()

source§

fn meta() -> Vec<MetaApi>

source§

fn register(_registry: &mut Registry)

source§

fn add_routes( self, _route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>> )

source§

impl<T1: OpenApi, T2: OpenApi, T3: OpenApi, T4: OpenApi, T5: OpenApi, T6: OpenApi, T7: OpenApi, T8: OpenApi, T9: OpenApi> OpenApi for (T1, T2, T3, T4, T5, T6, T7, T8, T9)

source§

fn meta() -> Vec<MetaApi>

source§

fn register(registry: &mut Registry)

source§

fn add_routes( self, route_table: &mut HashMap<String, HashMap<Method, BoxEndpoint<'static>>> )

Implementors§