The layout in the docs / source feels strange with everything buried under the predicate module. The goal seems to be to allow imports like:
use predicates::{predicate, Predicate};
Proposal:
- Move all predicate modules into the root with a
pub use in lib.rs
- Move
Predicate and BoxedPredicate in dedicated private files in the root with a pub use in lib.rs.
- Create a
prelude module that contains
Predicate
predicate module which only re-exports the factory functions
- Add a note to the factory functions about this
- Add a note to the
*Predicates about using the factories from predicate.
The standard import would now look like:
use predicates::prelude::*;
Benefits
- Standard import is more consistent with regular stuff
- Source and docs organization will be less nested
- Docs will be a little more organized
- The scope of the
predicate module will be narrowed to just factories which imo makes the intent / starting point more clear.
The layout in the docs / source feels strange with everything buried under the
predicatemodule. The goal seems to be to allow imports like:Proposal:
pub useinlib.rsPredicateandBoxedPredicatein dedicated private files in the root with apub useinlib.rs.preludemodule that containsPredicatepredicatemodule which only re-exports the factory functions*Predicates about using the factories frompredicate.The standard import would now look like:
Benefits
predicatemodule will be narrowed to just factories which imo makes the intent / starting point more clear.