4 ms·
Usually you return a closure with impl Fn. Another use case is to return an iterator. I wrote a post about it. Let me know if it helps. https://medium.com/@io
by iopq 8y ago
Usually you return a closure with impl Fn. Another use case is to return an iterator.
I wrote a post about it. Let me know if it helps.
https://medium.com/@iopguy/impl-trait-in-rust-explanation-efde0d94946a https://medium.com/@iopguy/impl-trait-in-rust-explanation-ef...