Add SpaRouter (#904)

This commit is contained in:
David Pedersen
2022-04-03 18:29:37 +02:00
committed by GitHub
parent 2270cf7b3e
commit 405e3f8c44
10 changed files with 314 additions and 12 deletions
+6
View File
@@ -4,6 +4,9 @@ use axum::{handler::Handler, Router};
mod resource;
#[cfg(feature = "spa")]
mod spa;
#[cfg(feature = "typed-routing")]
mod typed;
@@ -15,6 +18,9 @@ pub use axum_macros::TypedPath;
#[cfg(feature = "typed-routing")]
pub use self::typed::{FirstElementIs, TypedPath};
#[cfg(feature = "spa")]
pub use self::spa::SpaRouter;
/// Extension trait that adds additional methods to [`Router`].
pub trait RouterExt<B>: sealed::Sealed {
/// Add a typed `GET` route to the router.