-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
derive_Elastic*Mapping Macro #59
Comments
So I'm thinking that having an |
This should also cover building up the |
So this whole mapping design needs to be revisited. See: rust-lang/rfcs#1148 Because we can't convince the compiler that
Possible options include not auto deriving formats and mappings. Just make it easy enough to do on the client side with a macro, so only concrete impls are available. But that almost defeats the purpose of using traits in the first place because it makes it almost not worth it for people who don't want to use macros. This can at least be tested. |
So this has been reworked to not use any auto impls and is looking alright so far. I'll get this all to work properly, then tidy it up ( |
A compiler plugin macro that implements the appropriate
Elastic*Mapping
trait, moves the body fns to the impl, and implements the correctserde::Serialize
format.This will be a nuke-macro that makes it easy for a user to just do it as far as defining custom mapping goes. Doing it manually isn't a huge chore anyways. This is just for extra convenience.
The text was updated successfully, but these errors were encountered: