very elegant extension API and parts of it used in std as POC
This commit is contained in:
@@ -14,4 +14,4 @@ syn = { version = "2.0.52" }
|
||||
orchid-api-traits = { version = "0.1.0", path = "../orchid-api-traits" }
|
||||
proc-macro2 = "1.0.78"
|
||||
darling = "0.20.8"
|
||||
itertools = "0.12.1"
|
||||
itertools = "0.13.0"
|
||||
|
||||
@@ -8,7 +8,7 @@ use crate::common::{add_trait_bounds, destructure, pos_field_name};
|
||||
pub fn derive(input: TokenStream) -> TokenStream {
|
||||
// Parse the input tokens into a syntax tree
|
||||
let input = parse_macro_input!(input as syn::DeriveInput);
|
||||
let e_generics = add_trait_bounds(input.generics, parse_quote!(orchid_api_traits::Decode));
|
||||
let e_generics = add_trait_bounds(input.generics, parse_quote!(orchid_api_traits::Encode));
|
||||
let (e_impl_generics, e_ty_generics, e_where_clause) = e_generics.split_for_impl();
|
||||
let name = input.ident;
|
||||
let encode = encode_body(&input.data);
|
||||
|
||||
Reference in New Issue
Block a user