OOP Inheritance based on Composition Trait Wrappers

Hi everyone. I'm Francisco Leon, and this is my first experience publishing a crate in Rust that could facilitates the development by enabling the reusability that brings the Composition Pattern.

Let's present you Hereditary, a framework that generates the boilerplate of trait delegation for the composited struct, by Forwarding the required methods that wrap the functionality already implemented in the contained instances referenced by its struct fields:

Hereditary: Procedural macros for emulating OOP Inheritance in Rust

Currently I'm working on improving the documentation of this crate, but I hope that could be easly used in your projects.

This is a commonly asked feature for Rust, the need for a syntactic sugar that allows vesting a composited struct with the trait functionality already implemented by its subelements.
RFC: Delegation #2393

May there are others crates that were focused on solving the same problem, some of those I didn't know until yesterday, F.E. Ambassador, that shares a similar semantics as my project.
Anyhow, I hope I could contribute with the solution with this particular crate.

I'm glad about your suggestions.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.