#struct #field #macro #generate #hash-map #containing #procedural

macro bin subimpl

A procedural macro that generates all the implementations of a type for a struct containing a field of that type

2 releases

0.1.1 Jun 1, 2024
0.1.0 Jun 1, 2024

#450 in Procedural macros

MIT license

6KB
106 lines

SUBIMPL

Derive macros for generating required impls for a struct to redirect all calls to a field.

Currently only supports HashMaps.

This is an incredibly dirty hack, and it only exists to make my life a little easier while maintaining my main project, nodetastic. Feel free to steal this, and make it into an actually maintained crate, or if one already exists/this is an existing feature in rust that I do not know about, please do tell. This repository does not spark joy.

Dependencies

~250–690KB
~17K SLoC