Rust version of this (as close as possible) would be very cool.