More visibility modifiers
You can use the pub
keyword to make something a part of a module's public interface. But inaddition, there are some new forms:
pub(crate) struct Foo;
pub(in a::b::c) struct Bar;
The first form makes the Foo
struct public to your entire crate, but notexternally. The second form is similar, but makes Bar
public for one othermodule, a::b::c
in this case.