- Rust Standard Library Cookbook
- Jan Nils Ferner Daniel Durante
- 39字
- 2021-08-27 19:45:05
There's more...
If you want to randomly populate an entire struct, you use the rand_derive helper crate in order to derive it from Rand. You can then generate your own struct, just as you would generate any other type.