Suppose I have a library crate with two top-level modules “A” and “B”. Each of those modules has several traits I’d like to make available outside the crate, i.e.,
I could shove everything for module
src/B.rs (ignoring camel case etc conventions for now). But once the traits and their implementations and tests become too large
src/B.rs become unwieldy.
Assuming a 2018 uniform paths (i.e. nightly) environment what’s the idiomatic way to split these files up? I understand I no longer need
mod.rs files in each module directory and I’d like to keep the traits in the
B:: modules if possible, rather than in their own submodules of
I think I would still need a
mod.rs for each module to tie the source files into each module?
Any advice much appreciated,