Are there any ways to recursively flatten tuples?
<p>In Rust, is there any way to use <code>trait</code>s and <code>impl</code>s to (recursively) flatten tuples?</p>

<p>If it helps, something that works with N nested pairs is a good start</p>

<pre><code>trait FlattenTuple {
    fn into_flattened(self) -&gt; /* ??? */
}

// such that
assert_eq!((1, (2, 3)).into_flattened(), (1, 2, 3))
</code></pre>

<p>It would be even better if it could be extended work with any kind of nested tuple such that: </p>

<pre><code>assert_eq!(((1, 2), 2, (3, (4, 5))).into_flattened(), (1, 2, 2, 3, 4, 5))
</code></pre>