Working on a pet project, I found myself writing some utility on base types, like:
- on Option:
if_present<F>(self, value_handler: F) where F: FnOnce(T) -> ()
- on Vec:
if_empty<F>(&self, f: F) where F: FnOnce()
Maybe this is something that can be added to the Rust language. Being new to Rust, I still do not know whether the RFC process is required or not for such a thing. Or even if this kind of addition is something the community is interrested in.
Can someone enlighten me ?
Thanks in advance,