make macro implement trait

This commit is contained in:
David Pedersen
2022-02-13 12:49:12 +01:00
parent 3682586513
commit c84d6d66d4
7 changed files with 226 additions and 179 deletions
+2 -1
View File
@@ -3,8 +3,9 @@
use axum::{body::Body, Router};
mod resource;
mod typed_path;
pub use self::resource::Resource;
pub use self::{resource::Resource, typed_path::TypedPath};
/// Extension trait that adds additional methods to [`Router`].
pub trait RouterExt<B>: sealed::Sealed {
+10
View File
@@ -0,0 +1,10 @@
use std::borrow::Cow;
/// TODO
pub trait TypedPath {
/// TODO
const PATH: &'static str;
/// TODO
fn path(&self) -> Cow<'static, str>;
}