mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-08 00:00:24 +02:00
wip
This commit is contained in:
@@ -49,6 +49,7 @@ use syn::parse::Parse;
|
||||
|
||||
mod debug_handler;
|
||||
mod from_request;
|
||||
mod route;
|
||||
|
||||
/// Derive an implementation of [`FromRequest`].
|
||||
///
|
||||
@@ -385,6 +386,12 @@ pub fn debug_handler(_attr: TokenStream, input: TokenStream) -> TokenStream {
|
||||
return expand_attr_with(_attr, input, debug_handler::expand);
|
||||
}
|
||||
|
||||
/// TODO
|
||||
#[proc_macro_derive(Route, attributes(route))]
|
||||
pub fn derive_route(input: TokenStream) -> TokenStream {
|
||||
expand_with(input, route::expand)
|
||||
}
|
||||
|
||||
fn expand_with<F, I, K>(input: TokenStream, f: F) -> TokenStream
|
||||
where
|
||||
F: FnOnce(I) -> syn::Result<K>,
|
||||
|
||||
Reference in New Issue
Block a user