More visibility modifiers

Minimum Rust version: 1.18

You can use the pub keyword to make something a part of a module's public interface. But inaddition, there are some new forms:

  1. pub(crate) struct Foo;
  2. 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.