#question about reexports and use

5 messages · Page 1 of 1 (latest)

tall ginkgo
#

Im making a library and I want to have everything only accessible through

some_library::prelude::<whatever>

So for example if i have "pub struct Hello;" in hello.rs
lib.rs ( contains: pub mod prelude { pub use crate::a :: b:: c::hello::Hello })
a/
---| b/
---| ---| c/
---|---|---| hello.rs
---|---|---| mod.rs

Can i make it so that doing

use some_library:: a :: b : : c :: hello :: Hello is not allowed, and only allow some_library: :prelude::Hello

limpid marlin
#

or pub(crate) I mean

#

but I believe it's standard to leave at least one other path if you're using prelude style modules

#

also prelude should ideally contain only traits and really distinct types