4 ms·
What is the use case ? Is there simple examples one could go through?
by ejanus 8y ago
What is the use case ? Is there simple examples one could go through?
- iopq 8y agoUsually 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...
- steveklabnik 8y agohttps://blog.rust-lang.org/2018/05/10/Rust-1.26.html https://blog.rust-lang.org/2018/05/10/Rust-1.26.html has a section about it.
- ejanus 8y agoThanks