title: Rust Pyo3 bindings: How to reuse python methods
body: <p>I have a Rust class like <code>struct A&lt;X&gt;{...}</code> and I'd like to create several Python classes, each one with different <code>X</code></p>
  <pre><code>struct A&lt;X&gt;{
     ...
  }
  #[pyclass]
  pub struct AInt {
      a: A&lt;i32&gt;,
  }
  #[pyclass]
  pub struct AUInt {
      a: A&lt;u32&gt;,
  }
  #[pyclass]
  pub struct AByte {
      a: A&lt;u8&gt;,
  }
  </code></pre>
  <p>A lot of methods implemented by all of those classes will look identical. How could I reuse all of this code</p>
  <pre><code>#[pymethods]
  impl AByte{
    ... // exactly the same stuff for AUInt and AInt
  }
  </code></pre>
  <p>I would like to avoid using one huge macro.</p>