The impl_encoding macro dumps a ton of use statements into any module its used in, which forces a specific file and/or module structure on its users and makes it harder to understand what's actually pulled in.
Suggested Solution
I think the right solution here would be to use fully qualified names or just scoped use statements inside of functions.
Previous Work
I tried putting the impl into some generated module and re-export it but because it requires additional trait implementations, that doesn't work right now because the inner module doesn't have implementations for all the required traits.
Problem
The
impl_encoding
macro dumps a ton ofuse
statements into any module its used in, which forces a specific file and/or module structure on its users and makes it harder to understand what's actually pulled in.Suggested Solution
I think the right solution here would be to use fully qualified names or just scoped
use
statements inside of functions.Previous Work
I tried putting the impl into some generated module and re-export it but because it requires additional trait implementations, that doesn't work right now because the inner module doesn't have implementations for all the required traits.