&gt; But Rust requires a closure there. You can&#x27;t pass a pointer to a function.<p>Actually, you can.<p><pre><code>    fn perr(e: &amp;str) {
        println!(&quot;There was an error :(, {}&quot;, e)
    }

    fn main() {
        Err(&quot;ERROR&quot;).unwrap_or_else(perr);
    }
</code></pre>
The above code works, and can be run here: <a href="http:&#x2F;&#x2F;is.gd&#x2F;2RCmG9" rel="nofollow">http:&#x2F;&#x2F;is.gd&#x2F;2RCmG9</a>