I am the Rust beginner in the process of porting the C++ code to rust. These are the details of the original design:
The C++ library features a class which is parent class of several other classes. All these other classes reside at the same hierarchy level (siblings basically).
class A : public M;
class B : public M;
class C : public M;
class N : public M;
By using the Rust's traits and composition, I've successfully ported the 'class A: public M' part. At this same moment, I notice that the Rust modularization rules stipulate certain directory structure when classes depend on each other, and according to these rules suggested by the compiler my Rust library src folder should have the following structure:
But, when the class B is implemented, under the same set of rules I should have
which seemingly in the long run leads into having N subdirectories for the same parent class.
What would be the way to circumvent these kinds of situations ?
Basically, is it possible to somehow nudge the compiler to live with the flat directory structure of classes source files ?