In this piece of code, how A is written is not recommended but B is recommended.
cargo building this warns about the trait A but not the trait B:
warning: trait `Private` is more private than the item `A`
How B is written is also recommended as "the sealed trait" pattern in Rust API Guidelines.
My question is, why is this the case? Both have the same effect of preventing A or B from being implemented outside of the crate/module, and keeping the Private trait's interfaces private. At the same time, B is obviously more verbose and less intuitive (I would not think of using the B pattern or think of that B will not trigger the warning that A does without getting to the API Guidelines). Yet B is the recommended way.
And at this point the sealed-via-module pattern is relatively established, whereas the above is still considered to more likely just be an accident... I guess. I don't know if that means one is really recommended over the other or not (but would be interested in seeing a citation).
Ideally we'll some day get some sort of first-class sealing that (e.g.) coherence takes into account, but that's presumably not coming any time soon.