Guys, just voicing my opinion based on latest experience using composition of 3rdParties structs in order to customize behavior.
Rust simply is not ready to do it with ease. Something that in lets say C++ requires literally two words, in Rust becomes a nightmare of forwarding every required method. What's even worse, there are some scenarios like non associated functions that there is simply no way to easily just forward.
I really don't understand why something like that was overlooked specially taking the fact into consideration that Rust by design knew it will prefer composition over inheritance and yet didn't provide convenient syntax to actually use it.
struct MyStruct
{
inner: ThirdPartyStructWithLotsOfFunctions,
}
impl MyStruct
{
/*implement own or modified functionality
*/
//forward the rest:
use inner;//Is this something that was thought of and discarded for some valid reasons?
}
impl ATrait for MyStruct
{
use inner;
}