pub trait TypedApiRouter: TypedRouter {
    // Required methods
    fn typed_api_route(
        self,
        handler: fn() -> (&'static str, ApiMethodRouter<Self::State>)
    ) -> Self;
    fn typed_api_route_with(
        self,
        handler: fn() -> (&'static str, ApiMethodRouter<Self::State>),
        transform: impl FnOnce(TransformPathItem<'_>) -> TransformPathItem<'_>
    ) -> Self;
}
Expand description

Same as TypedRouter, but with support for aide.

Required Methods§

source

fn typed_api_route( self, handler: fn() -> (&'static str, ApiMethodRouter<Self::State>) ) -> Self

Same as TypedRouter::typed_route, but with support for aide.

source

fn typed_api_route_with( self, handler: fn() -> (&'static str, ApiMethodRouter<Self::State>), transform: impl FnOnce(TransformPathItem<'_>) -> TransformPathItem<'_> ) -> Self

Same as TypedApiRouter::typed_api_route, but with a custom path transform for use with aide.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<S> TypedApiRouter for ApiRouter<S>
where S: Send + Sync + Clone + 'static,

source§

fn typed_api_route( self, handler: fn() -> (&'static str, ApiMethodRouter<Self::State>) ) -> Self

source§

fn typed_api_route_with( self, handler: fn() -> (&'static str, ApiMethodRouter<Self::State>), transform: impl FnOnce(TransformPathItem<'_>) -> TransformPathItem<'_> ) -> Self

Implementors§