I've been writing Rust professionally for a few years now and if there's one thing I've learned it's that if you ever write a function that takes a parameter of `impl Fn(&Vec ) -> &'a str` you are going to be in for some pain. Just make it `impl Fn(&Vec ) -> String`. It is highly unlikely that the extra allocation is ever going to be noticed in the performance. Just because Rust pretty much forces you to be explicit…
A lot of programmers will look at '`impl Fn(&Vec ) -> &'a str`' and think what the hell is that, alien hieroglyphics?
At the end of the day, you can't understand a language without, well, learning it.