Tuple struct with a single field to make an opaque wrapper for the type.

Example:

struct Password(String);

Motivation:

  • share implementation details between types while controlling interface
  • allow backward compatible changes -> promise less, break less
  • distinguish units
  • implementing foreign traits on foreign types

References