mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-08 00:00:24 +02:00
make macro implement trait
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
use std::borrow::Cow;
|
||||
|
||||
/// TODO
|
||||
pub trait TypedPath {
|
||||
/// TODO
|
||||
const PATH: &'static str;
|
||||
|
||||
/// TODO
|
||||
fn path(&self) -> Cow<'static, str>;
|
||||
}
|
||||
Reference in New Issue
Block a user