use super::*;
pub type Union<T, R> = <T as Extend<R>>::Output;
pub trait Extend<T: ?Sized> {
type Output: ?Sized;
}
impl<T> Extend<()> for T {
type Output = T;
}
impl<T, E1> Extend<(E1,)> for T
where
T: Push,
{
type Output = <T::Output<E1> as Extend<()>>::Output;
}
impl<T, E1, E2> Extend<(E1, E2)> for T
where
T: Push<Output<E1>: Push>,
{
type Output = <T::Output<E1> as Extend<(E2,)>>::Output;
}
impl<T, E1, E2, E3> Extend<(E1, E2, E3)> for T
where
T: Push<Output<E1>: Push<Output<E2>: Push>>,
{
type Output = <T::Output<E1> as Extend<(E2, E3)>>::Output;
}
impl<T, E1, E2, E3, E4> Extend<(E1, E2, E3, E4)> for T
where
T: Push<Output<E1>: Push<Output<E2>: Push<Output<E3>: Push>>>,
{
type Output = <T::Output<E1> as Extend<(E2, E3, E4)>>::Output;
}
impl<T, E1, E2, E3, E4, E5> Extend<(E1, E2, E3, E4, E5)> for T
where
T: Push<Output<E1>: Push<Output<E2>: Push<Output<E3>: Push<Output<E4>: Push>>>>,
{
type Output = <T::Output<E1> as Extend<(E2, E3, E4, E5)>>::Output;
}
impl<T, E1, E2, E3, E4, E5, E6> Extend<(E1, E2, E3, E4, E5, E6)> for T
where
T: Push<
Output<E1>: Push<Output<E2>: Push<Output<E3>: Push<Output<E4>: Push<Output<E5>: Push>>>>,
>,
{
type Output = <T::Output<E1> as Extend<(E2, E3, E4, E5, E6)>>::Output;
}
impl<T, E1, E2, E3, E4, E5, E6, E7> Extend<(E1, E2, E3, E4, E5, E6, E7)> for T
where
T: Push<
Output<E1>: Push<
Output<E2>: Push<
Output<E3>: Push<Output<E4>: Push<Output<E5>: Push<Output<E6>: Push>>>,
>,
>,
>,
{
type Output = <T::Output<E1> as Extend<(E2, E3, E4, E5, E6, E7)>>::Output;
}
impl<T, E1, E2, E3, E4, E5, E6, E7, E8> Extend<(E1, E2, E3, E4, E5, E6, E7, E8)> for T
where
T: Push<
Output<E1>: Push<
Output<E2>: Push<
Output<E3>: Push<
Output<E4>: Push<Output<E5>: Push<Output<E6>: Push<Output<E7>: Push>>>,
>,
>,
>,
>,
{
type Output = <T::Output<E1> as Extend<(E2, E3, E4, E5, E6, E7, E8)>>::Output;
}
impl<T, E1, E2, E3, E4, E5, E6, E7, E8, E9> Extend<(E1, E2, E3, E4, E5, E6, E7, E8, E9)> for T
where
T: Push<
Output<E1>: Push<
Output<E2>: Push<
Output<E3>: Push<
Output<E4>: Push<
Output<E5>: Push<Output<E6>: Push<Output<E7>: Push<Output<E8>: Push>>>,
>,
>,
>,
>,
>,
{
type Output = <T::Output<E1> as Extend<(E2, E3, E4, E5, E6, E7, E8, E9)>>::Output;
}
impl<T, E1, E2, E3, E4, E5, E6, E7, E8, E9, E10> Extend<(E1, E2, E3, E4, E5, E6, E7, E8, E9, E10)>
for T
where
T: Push<
Output<E1>: Push<
Output<E2>: Push<
Output<E3>: Push<
Output<E4>: Push<
Output<E5>: Push<
Output<E6>: Push<Output<E7>: Push<Output<E8>: Push<Output<E9>: Push>>>,
>,
>,
>,
>,
>,
>,
{
type Output = <T::Output<E1> as Extend<(E2, E3, E4, E5, E6, E7, E8, E9, E10)>>::Output;
}
impl<T, E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11>
Extend<(E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11)> for T
where
T: Push<
Output<E1>: Push<
Output<E2>: Push<
Output<E3>: Push<
Output<E4>: Push<
Output<E5>: Push<
Output<E6>: Push<
Output<E7>: Push<
Output<E8>: Push<Output<E9>: Push<Output<E10>: Push>>,
>,
>,
>,
>,
>,
>,
>,
>,
{
type Output = <T::Output<E1> as Extend<(E2, E3, E4, E5, E6, E7, E8, E9, E10, E11)>>::Output;
}
impl<T, E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12>
Extend<(E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12)> for T
where
T: Push<
Output<E1>: Push<
Output<E2>: Push<
Output<E3>: Push<
Output<E4>: Push<
Output<E5>: Push<
Output<E6>: Push<
Output<E7>: Push<
Output<E8>: Push<
Output<E9>: Push<Output<E10>: Push<Output<E11>: Push>>,
>,
>,
>,
>,
>,
>,
>,
>,
>,
{
type Output =
<T::Output<E1> as Extend<(E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12)>>::Output;
}