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
.
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.