title: Providing an implementation when both trait and type are not in this crate
body: <p>I want to provide an implementation of a trait <code>ToHex</code> (not defined by me, from <code>serialize</code>) for a primitive type <code>u8</code>:</p>
  
  <pre class="lang-rust prettyprint-override"><code>impl ToHex for u8 {
      fn to_hex(&amp;self) -&gt; String {
          self.to_str_radix(16)
      }
  }
  </code></pre>
  
  <p>The problem is I get this compiler error:</p>
  
  <pre><code>error: cannot provide an extension implementation where both trait and type are not defined in this crate
  </code></pre>
  
  <p>I understand the reason of this error and its logic, this is because both the trait and the primitive type are external to my code. But how can I handle this situation and provide an <code>ToHex</code> implementation for <code>u8</code>? And more generally how do you handle this kind of issue, it seems to me that this problem must be common and it should be possible and easy to extend types like this?</p>