I'm floored by how easy this was to write, given that I don't know rust, and some of the minutiae would have taken me hours to suss out on my own. I still don't know how to write Rust, but I still successfully wrote a program in it!
After having ChatGPT write this, I wouldn't say I understand rust, because I can't explain some of the hairier bits of how to access strings, but now that I have the code to look at, I can certainly try and understand it (or have ChatGPT explain it to me).
I don't know rust at all, so this was a totally blind stab at writing rust code.
ChatGPT transcript: https://chat.openai.com/share/646e8440-f566-45ea-9c31-2c43d8...