title: How can I define a global random number generator?
body: <p>I've tried both</p>
  
  <pre><code>static mut rng:XorShiftRng = XorShiftRng::new_unseeded();
  static mut rng:Rng + 'static = rand::weak_rng();
  </code></pre>
  
  <p>But neither work. Is it a way to do so?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I want to make a module that has some recursive functions needing random numbers. I don't want the user to supply a random number generator neither do I want to supply a struct to user. So I hope there is a module-wise RNG.</p>