Write a program in Rust, such that make an instance of a struct that store fields for a gun, fields are name: String, type: String, energy: u64, num_of_rounds_per_mag: i32, total_rounds: i32 . and also implement the method for firing of gun and reloading.