no runtime cost.</li>
</ul>

<p>Sometimes purely static enforcement is impossible or impractical. In these
cases, a library should check as much as possible statically, but defer to
dynamic checks where needed.</p>

<p>For example, the <code>std::string</code> module exports a <code>String</code> type with the guarantee
that all instances are valid utf-8:</p>

<ul>
<li><p>Any <em>consumer</em> of a <code>String</code> is statically guaranteed utf-8 contents. For example,
the <code>append</code> method can p