Rust Standard Library Cookbook
上QQ阅读APP看书,第一时间看更新

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.