You're not allowed to use references in structs until you think Rust is easy. They're the evil-hardmode of Rust that will ruin your day.
Use Box
or Arc
to store things in structs "by reference". Temporary borrows don't do what you think they do.