>fn main() {
    match val.do_something() {
    Cat(a) =&gt; { /* ... */ }
    _      =&gt; { /* ... */ }
}
}</span><pre class='rust rust-example-rendered'>
<span class='kw'>match</span> <span class='ident'>val</span>.<span class='ident'>do_something</span>() {
    <span class='ident'>Cat</span>(<span class='ident'>a</span>) <span class='op'>=&gt;</span> { <span class='comment'>/* ... */</span> }
    _      <span class='op'>=&gt;</span> { <span class='comment'>/* ... */</span> }
}</pre>

<p><a href="https:/