I'm basically looking at using How to implement inheritance-like feature for Rust? idea. I have a Shape struct and want an ElevationMap to do everything Shape does but with a few more properties and methods. Previously I had a macro that did it all fine but thought it would be nice to test out the inheritance-like-feature, and it does work, and is better in lots of ways... Except that any application using ElevationMap has to have an extra line at the beginning:
use pi3d::shape::AsMutShape; ... let mut terrain = pi3d::elevation_map::new(); ... terrain.draw()
Which will seem like a magic incantation to anyone using the module. Better IMO to just make the shape property public
... let mut terrain = pi3d::elevation_map::new(); ... terrain.shape.draw();
Is there any way to avoid this?