title: When to use self, &self, &mut self in methods?
body: <p>What is the difference between a method taking <code>self</code> and a method taking <code>&amp;self</code> or even <code>&amp;mut self</code>?</p>
  <p>E.g.</p>
  <pre class="lang-rust prettyprint-override"><code>impl SomeStruct {
      fn example1(self) { }
      fn example2(&amp;self) { }
      fn example3(&amp;mut self) { }
  }
  </code></pre>
  <p>Say I want to implement a method that pretty prints the struct to stdout, should I take <code>&amp;self</code>? I guess <code>self</code> also works? I'm not sure when to use what.</p>