Working on card game deck, where want to get (or sometimes take) random card and also mix the array. In PHP, it's simple by array_rand and shuffle functions but what about Rust?
Found few options, where not sure about performance context - maybe the vector even is not optimal choose here as keep the indexes order and maybe I want some other kind of array type..
Sorry, just removed (I'm using it instead of Google last time) about machine generated content it's maybe something about bots activity, as people play with that everywhere. But will keep in mind!
rand is probably the crate you want. Here's the trait that probably fulfills your needs.
Thank you! Have done with following implementation: