Trait axum_typed_routing::TypedApiRouter
source · 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§
sourcefn typed_api_route(
self,
handler: fn() -> (&'static str, ApiMethodRouter<Self::State>)
) -> Self
fn typed_api_route( self, handler: fn() -> (&'static str, ApiMethodRouter<Self::State>) ) -> Self
Same as TypedRouter::typed_route, but with support for aide.
sourcefn typed_api_route_with(
self,
handler: fn() -> (&'static str, ApiMethodRouter<Self::State>),
transform: impl FnOnce(TransformPathItem<'_>) -> TransformPathItem<'_>
) -> Self
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.