TupleSplitInto

Trait TupleSplitInto 

Source
pub trait TupleSplitInto<L, R>: TupleSplitIntoLeft<L, Right = R> + TupleSplitIntoRight<R, Left = L>
where L: Tuple, R: Tuple,
{ // Required method fn split_tuple_into(self) -> (L, R); }
Expand description

A trait for splitting a tuple up into two parts given a specified left part L and right part R. L and R must be the left and right part of Self.

Tuples will be split into parts L and R.

§Example

let t = (1, 1.0, "test");

let (l, r) = tuple_split::split_tuple_into::<(u8, f32), (&str,)>(t);

assert_eq!(t, tupleops::concat_tuples(l, r));

Required Methods§

Implementors§

Source§

impl<T, L, R> TupleSplitInto<L, R> for T
where Self: TupleSplitIntoLeft<L, Right = R> + TupleSplitIntoRight<R, Left = L>, L: Tuple, R: Tuple,