pub trait TupleConcat<T> {
type Output;
// Required method
fn concat(self, other: T) -> Self::Output;
}
Expand description
Concat two tuples.
This works like TupleZip
, but takes another tuple as input.
Note:
This trait only has implementations for operations that return tuples of
length 5 / 10 (long-tuple-impl
feature) or less.
That means that (A, B, C, D, E, F, G)
cannot be concated with (H, I, J, K, L)
.
§Example
use rs_std_ext::tuple::TupleConcat;
let x = (10u8, 'a');
let y = (-5i32, "foo");
let z = x.concat(y);
assert_eq!(z, (10u8, 'a', -5i32, "foo"));