How to avoid repetitive long generic constraints in Rust : <p>I'm trying to make my own implementation of big integers (just for education). The implementation is generic by data type:</p>

<pre><code>struct LongNum&lt;T&gt;
where T: Integer + MulAssign + CheckedMul + CheckedAdd + Copy + From&lt;u8&gt;
{
    values: Vec&lt;T&gt;,
    powers: Vec&lt;u8&gt;,
    radix: u8,
}
</code></pre>

<p>The problem is that I need to repeat this verbose constraint for T in all impls. It's too cumbersome.</p>

<p>I can make my own trait combining these constraints, like this:</p>

<pre><code>trait LongNumValue: Integer + MulAssign + CheckedMul + CheckedAdd + Copy + From&lt;u8&gt; {}

struct LongNum&lt;T: LongNumValue&gt;
{
    values: Vec&lt;T&gt;,
    powers: Vec&lt;u8&gt;,
    radix: u8,
}
</code></pre>

<p>But in this case I have to add impls for this LongNumValue trait to all types which can be used in LongNum:</p>

<pre><code>impl LongNumValue for u8 {}
impl LongNumValue for u16 {}
impl LongNumValue for u32 {}
...
</code></pre>

<p>This means that if I don't add some type to this list of impls, the user of my crate will be unable to use this type for LongNum, even if this type is passes all constraints.</p>

<p>Is there any way to avoid writing long repetitive costraints without adding unnecessary restrictions to user?</p>
