From 1791c089b61d366d03f715e82877defbdfed40e1 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Sun, 9 Jun 2019 14:22:49 +0200 Subject: [PATCH] macro: need to allow specifying the body type now TODO: - change parse_object to use Punctuated for the fields to support longer value types (so we can use actual types as fields) - allow adding a body type to methods - allow adding a body type to routers explicitly Signed-off-by: Wolfgang Bumiller --- proxmox-api-macro/src/api_macro.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/proxmox-api-macro/src/api_macro.rs b/proxmox-api-macro/src/api_macro.rs index 7c1c4a27..63c44390 100644 --- a/proxmox-api-macro/src/api_macro.rs +++ b/proxmox-api-macro/src/api_macro.rs @@ -74,6 +74,12 @@ fn handle_function( value: false, }); + //let mut body_type = definition + // .remove("body") + // .map(|v| v.expect_tt()) + // .transpose()? + // .unwrap_or_else(|| quote! { ::hyper::Body }); + let vis = std::mem::replace(&mut item.vis, syn::Visibility::Inherited); let span = item.ident.span(); let name_str = item.ident.to_string();