So I want to make a nice and tidy interface for my library crate. So instead letting a user have access to sub-modules, I want them to be able to reach structs/etc from the library root (lib.rs):
pub use sh2::Sh2;
And in the client code, I try to access about thusly:
let sh2 = libname::Sh2::new();
However, this will fail with:
Which was the whole point.
pub mod sh2; makes things compile, but we loose the encapsulation.
So was this by design? Am I doing something wrong?