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 <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2019-06-09 14:22:49 +02:00
parent ff2767129f
commit 1791c089b6

View File

@ -74,6 +74,12 @@ fn handle_function(
value: false, 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 vis = std::mem::replace(&mut item.vis, syn::Visibility::Inherited);
let span = item.ident.span(); let span = item.ident.span();
let name_str = item.ident.to_string(); let name_str = item.ident.to_string();