-
-
Save rust-play/f628be0a9405ef11c752ddea91f2c5af to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub trait SqlType { | |
type IsNull: OneIsNullable<is_nullable::IsNullable> + OneIsNullable<is_nullable::NotNull>; | |
} | |
pub trait OneIsNullable<Other> { | |
type Out: OneIsNullable<is_nullable::IsNullable> + OneIsNullable<is_nullable::NotNull>; | |
} | |
pub trait Expression { | |
type SqlType: SqlType; | |
} | |
pub struct Nullable<ST>(ST); | |
impl<ST> SqlType for Nullable<ST> | |
where | |
ST: SqlType, | |
{ | |
type IsNull = is_nullable::IsNullable; | |
} | |
pub trait IntoNullable { | |
type Nullable; | |
} | |
impl<T> IntoNullable for T | |
where | |
T: SqlType<IsNull = is_nullable::NotNull> + SingleValue, | |
{ | |
type Nullable = Nullable<T>; | |
} | |
impl<T> IntoNullable for Nullable<T> | |
where | |
T: SqlType, | |
{ | |
type Nullable = Self; | |
} | |
pub trait SingleValue: SqlType {} | |
impl<T: SqlType + SingleValue> SingleValue for Nullable<T> {} | |
pub mod is_nullable { | |
use super::*; | |
#[derive(Debug, Clone, Copy)] | |
pub struct NotNull; | |
#[derive(Debug, Clone, Copy)] | |
pub struct IsNullable; | |
impl OneIsNullable<NotNull> for NotNull { | |
type Out = NotNull; | |
} | |
impl OneIsNullable<IsNullable> for NotNull { | |
type Out = IsNullable; | |
} | |
impl OneIsNullable<NotNull> for IsNullable { | |
type Out = IsNullable; | |
} | |
impl OneIsNullable<IsNullable> for IsNullable { | |
type Out = IsNullable; | |
} | |
} | |
macro_rules! tuple_impls { | |
($( | |
$Tuple:tt { | |
$(($idx:tt) -> $T:ident, $ST:ident, $TT:ident,)+ | |
} | |
)+) => { | |
$( | |
impl_sql_type!($($T,)*); | |
impl<$($T: SqlType,)*> IntoNullable for ($($T,)*) | |
where Self: SqlType, | |
{ | |
type Nullable = Nullable<($($T,)*)>; | |
} | |
)* | |
}; | |
} | |
macro_rules! impl_sql_type { | |
($T1: ident, $($T: ident,)+) => { | |
impl<$T1, $($T,)+> SqlType for ($T1, $($T,)*) | |
where $T1: SqlType, | |
($($T,)*): SqlType, | |
$T1::IsNull: OneIsNullable<<($($T,)*) as SqlType>::IsNull>, | |
{ | |
type IsNull = <$T1::IsNull as OneIsNullable<<($($T,)*) as SqlType>::IsNull>>::Out; | |
} | |
}; | |
($T1: ident,) => { | |
impl<$T1> SqlType for ($T1,) | |
where $T1: SqlType, | |
{ | |
type IsNull = $T1::IsNull; | |
} | |
} | |
} | |
macro_rules! __diesel_for_each_tuple { | |
(1, $callback:ident) => { | |
$callback! { | |
1 { | |
(0) -> A, SA, TA, | |
} | |
} | |
}; | |
(2, $callback: ident) => { | |
$callback! { | |
2 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
} | |
} | |
__diesel_for_each_tuple!(1, $callback); | |
}; | |
(3, $callback: ident) => { | |
$callback! { | |
3 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
} | |
} | |
__diesel_for_each_tuple!(2, $callback); | |
}; | |
(4, $callback: ident) => { | |
$callback! { | |
4 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
} | |
} | |
__diesel_for_each_tuple!(3, $callback); | |
}; | |
(5, $callback: ident) => { | |
$callback! { | |
5 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
} | |
} | |
__diesel_for_each_tuple!(4, $callback); | |
}; | |
(6, $callback: ident) => { | |
$callback! { | |
6 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
} | |
} | |
__diesel_for_each_tuple!(5, $callback); | |
}; | |
(7, $callback: ident) => { | |
$callback! { | |
7 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
} | |
} | |
__diesel_for_each_tuple!(6, $callback); | |
}; | |
(8, $callback: ident) => { | |
$callback! { | |
8 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
} | |
} | |
__diesel_for_each_tuple!(7, $callback); | |
}; | |
(9, $callback: ident) => { | |
$callback! { | |
9 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
} | |
} | |
__diesel_for_each_tuple!(8, $callback); | |
}; | |
(10, $callback: ident) => { | |
$callback! { | |
10 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
} | |
} | |
__diesel_for_each_tuple!(9, $callback); | |
}; | |
(11, $callback: ident) => { | |
$callback! { | |
11 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
(10) -> K, SK, TK, | |
} | |
} | |
__diesel_for_each_tuple!(10, $callback); | |
}; | |
(12, $callback: ident) => { | |
$callback! { | |
12 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
(10) -> K, SK, TK, | |
(11) -> L, SL, TL, | |
} | |
} | |
__diesel_for_each_tuple!(11, $callback); | |
}; | |
(13, $callback: ident) => { | |
$callback! { | |
13 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
(10) -> K, SK, TK, | |
(11) -> L, SL, TL, | |
(12) -> M, SM, TM, | |
} | |
} | |
__diesel_for_each_tuple!(12, $callback); | |
}; | |
(14, $callback: ident) => { | |
$callback! { | |
14 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
(10) -> K, SK, TK, | |
(11) -> L, SL, TL, | |
(12) -> M, SM, TM, | |
(13) -> N, SN, TN, | |
} | |
} | |
__diesel_for_each_tuple!(13, $callback); | |
}; | |
(15, $callback: ident) => { | |
$callback! { | |
15 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
(10) -> K, SK, TK, | |
(11) -> L, SL, TL, | |
(12) -> M, SM, TM, | |
(13) -> N, SN, TN, | |
(14) -> O, SO, TO, | |
} | |
} | |
__diesel_for_each_tuple!(14, $callback); | |
}; | |
(16, $callback: ident) => { | |
$callback! { | |
16 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
(10) -> K, SK, TK, | |
(11) -> L, SL, TL, | |
(12) -> M, SM, TM, | |
(13) -> N, SN, TN, | |
(14) -> O, SO, TO, | |
(15) -> P, SP, TP, | |
} | |
} | |
__diesel_for_each_tuple!(15, $callback); | |
}; | |
(17, $callback: ident) => { | |
$callback! { | |
17 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
(10) -> K, SK, TK, | |
(11) -> L, SL, TL, | |
(12) -> M, SM, TM, | |
(13) -> N, SN, TN, | |
(14) -> O, SO, TO, | |
(15) -> P, SP, TP, | |
(16) -> Q, SQ, TQ, | |
} | |
} | |
__diesel_for_each_tuple!(16, $callback); | |
}; | |
(18, $callback: ident) => { | |
$callback! { | |
18 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
(10) -> K, SK, TK, | |
(11) -> L, SL, TL, | |
(12) -> M, SM, TM, | |
(13) -> N, SN, TN, | |
(14) -> O, SO, TO, | |
(15) -> P, SP, TP, | |
(16) -> Q, SQ, TQ, | |
(17) -> R, SR, TR, | |
} | |
} | |
__diesel_for_each_tuple!(17, $callback); | |
}; | |
(19, $callback: ident) => { | |
$callback! { | |
19 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
(10) -> K, SK, TK, | |
(11) -> L, SL, TL, | |
(12) -> M, SM, TM, | |
(13) -> N, SN, TN, | |
(14) -> O, SO, TO, | |
(15) -> P, SP, TP, | |
(16) -> Q, SQ, TQ, | |
(17) -> R, SR, TR, | |
(18) -> S, SS, TS, | |
} | |
} | |
__diesel_for_each_tuple!(18, $callback); | |
}; | |
(20, $callback: ident) => { | |
$callback! { | |
20 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
(10) -> K, SK, TK, | |
(11) -> L, SL, TL, | |
(12) -> M, SM, TM, | |
(13) -> N, SN, TN, | |
(14) -> O, SO, TO, | |
(15) -> P, SP, TP, | |
(16) -> Q, SQ, TQ, | |
(17) -> R, SR, TR, | |
(18) -> S, SS, TS, | |
(19) -> T, ST, TT, | |
} | |
} | |
__diesel_for_each_tuple!(19, $callback); | |
}; | |
(21, $callback: ident) => { | |
$callback! { | |
21 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
(10) -> K, SK, TK, | |
(11) -> L, SL, TL, | |
(12) -> M, SM, TM, | |
(13) -> N, SN, TN, | |
(14) -> O, SO, TO, | |
(15) -> P, SP, TP, | |
(16) -> Q, SQ, TQ, | |
(17) -> R, SR, TR, | |
(18) -> S, SS, TS, | |
(19) -> T, ST, TT, | |
(20) -> U, SU, TU, | |
} | |
} | |
__diesel_for_each_tuple!(20, $callback); | |
}; | |
(22, $callback: ident) => { | |
$callback! { | |
22 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
(10) -> K, SK, TK, | |
(11) -> L, SL, TL, | |
(12) -> M, SM, TM, | |
(13) -> N, SN, TN, | |
(14) -> O, SO, TO, | |
(15) -> P, SP, TP, | |
(16) -> Q, SQ, TQ, | |
(17) -> R, SR, TR, | |
(18) -> S, SS, TS, | |
(19) -> T, ST, TT, | |
(20) -> U, SU, TU, | |
(21) -> V, SV, TV, | |
} | |
} | |
__diesel_for_each_tuple!(21, $callback); | |
}; | |
(23, $callback: ident) => { | |
$callback! { | |
23 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
(10) -> K, SK, TK, | |
(11) -> L, SL, TL, | |
(12) -> M, SM, TM, | |
(13) -> N, SN, TN, | |
(14) -> O, SO, TO, | |
(15) -> P, SP, TP, | |
(16) -> Q, SQ, TQ, | |
(17) -> R, SR, TR, | |
(18) -> S, SS, TS, | |
(19) -> T, ST, TT, | |
(20) -> U, SU, TU, | |
(21) -> V, SV, TV, | |
(22) -> W, SW, TW, | |
} | |
} | |
__diesel_for_each_tuple!(22, $callback); | |
}; | |
(24, $callback: ident) => { | |
$callback! { | |
24 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
(10) -> K, SK, TK, | |
(11) -> L, SL, TL, | |
(12) -> M, SM, TM, | |
(13) -> N, SN, TN, | |
(14) -> O, SO, TO, | |
(15) -> P, SP, TP, | |
(16) -> Q, SQ, TQ, | |
(17) -> R, SR, TR, | |
(18) -> S, SS, TS, | |
(19) -> T, ST, TT, | |
(20) -> U, SU, TU, | |
(21) -> V, SV, TV, | |
(22) -> W, SW, TW, | |
(23) -> X, SX, TX, | |
} | |
} | |
__diesel_for_each_tuple!(23, $callback); | |
}; | |
(25, $callback: ident) => { | |
$callback! { | |
25 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
(10) -> K, SK, TK, | |
(11) -> L, SL, TL, | |
(12) -> M, SM, TM, | |
(13) -> N, SN, TN, | |
(14) -> O, SO, TO, | |
(15) -> P, SP, TP, | |
(16) -> Q, SQ, TQ, | |
(17) -> R, SR, TR, | |
(18) -> S, SS, TS, | |
(19) -> T, ST, TT, | |
(20) -> U, SU, TU, | |
(21) -> V, SV, TV, | |
(22) -> W, SW, TW, | |
(23) -> X, SX, TX, | |
(24) -> Y, SY, TY, | |
} | |
} | |
__diesel_for_each_tuple!(24, $callback); | |
}; | |
(26, $callback: ident) => { | |
$callback! { | |
26 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
(10) -> K, SK, TK, | |
(11) -> L, SL, TL, | |
(12) -> M, SM, TM, | |
(13) -> N, SN, TN, | |
(14) -> O, SO, TO, | |
(15) -> P, SP, TP, | |
(16) -> Q, SQ, TQ, | |
(17) -> R, SR, TR, | |
(18) -> S, SS, TS, | |
(19) -> T, ST, TT, | |
(20) -> U, SU, TU, | |
(21) -> V, SV, TV, | |
(22) -> W, SW, TW, | |
(23) -> X, SX, TX, | |
(24) -> Y, SY, TY, | |
(25) -> Z, SZ, TZ, | |
} | |
} | |
__diesel_for_each_tuple!(25, $callback); | |
}; | |
(27, $callback: ident) => { | |
$callback! { | |
27 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
(10) -> K, SK, TK, | |
(11) -> L, SL, TL, | |
(12) -> M, SM, TM, | |
(13) -> N, SN, TN, | |
(14) -> O, SO, TO, | |
(15) -> P, SP, TP, | |
(16) -> Q, SQ, TQ, | |
(17) -> R, SR, TR, | |
(18) -> S, SS, TS, | |
(19) -> T, ST, TT, | |
(20) -> U, SU, TU, | |
(21) -> V, SV, TV, | |
(22) -> W, SW, TW, | |
(23) -> X, SX, TX, | |
(24) -> Y, SY, TY, | |
(25) -> Z, SZ, TZ, | |
(26) -> AA, SAA, TAA, | |
} | |
} | |
__diesel_for_each_tuple!(26, $callback); | |
}; | |
(28, $callback: ident) => { | |
$callback! { | |
28 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
(10) -> K, SK, TK, | |
(11) -> L, SL, TL, | |
(12) -> M, SM, TM, | |
(13) -> N, SN, TN, | |
(14) -> O, SO, TO, | |
(15) -> P, SP, TP, | |
(16) -> Q, SQ, TQ, | |
(17) -> R, SR, TR, | |
(18) -> S, SS, TS, | |
(19) -> T, ST, TT, | |
(20) -> U, SU, TU, | |
(21) -> V, SV, TV, | |
(22) -> W, SW, TW, | |
(23) -> X, SX, TX, | |
(24) -> Y, SY, TY, | |
(25) -> Z, SZ, TZ, | |
(26) -> AA, SAA, TAA, | |
(27) -> AB, SAB, TAB, | |
} | |
} | |
__diesel_for_each_tuple!(27, $callback); | |
}; | |
(29, $callback: ident) => { | |
$callback! { | |
29 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
(10) -> K, SK, TK, | |
(11) -> L, SL, TL, | |
(12) -> M, SM, TM, | |
(13) -> N, SN, TN, | |
(14) -> O, SO, TO, | |
(15) -> P, SP, TP, | |
(16) -> Q, SQ, TQ, | |
(17) -> R, SR, TR, | |
(18) -> S, SS, TS, | |
(19) -> T, ST, TT, | |
(20) -> U, SU, TU, | |
(21) -> V, SV, TV, | |
(22) -> W, SW, TW, | |
(23) -> X, SX, TX, | |
(24) -> Y, SY, TY, | |
(25) -> Z, SZ, TZ, | |
(26) -> AA, SAA, TAA, | |
(27) -> AB, SAB, TAB, | |
(28) -> AC, SAC, TAC, | |
} | |
} | |
__diesel_for_each_tuple!(28, $callback); | |
}; | |
(30, $callback: ident) => { | |
$callback! { | |
30 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
(10) -> K, SK, TK, | |
(11) -> L, SL, TL, | |
(12) -> M, SM, TM, | |
(13) -> N, SN, TN, | |
(14) -> O, SO, TO, | |
(15) -> P, SP, TP, | |
(16) -> Q, SQ, TQ, | |
(17) -> R, SR, TR, | |
(18) -> S, SS, TS, | |
(19) -> T, ST, TT, | |
(20) -> U, SU, TU, | |
(21) -> V, SV, TV, | |
(22) -> W, SW, TW, | |
(23) -> X, SX, TX, | |
(24) -> Y, SY, TY, | |
(25) -> Z, SZ, TZ, | |
(26) -> AA, SAA, TAA, | |
(27) -> AB, SAB, TAB, | |
(28) -> AC, SAC, TAC, | |
(29) -> AD, SAD, TAD, | |
} | |
} | |
__diesel_for_each_tuple!(29, $callback); | |
}; | |
(31, $callback: ident) => { | |
$callback! { | |
31 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
(10) -> K, SK, TK, | |
(11) -> L, SL, TL, | |
(12) -> M, SM, TM, | |
(13) -> N, SN, TN, | |
(14) -> O, SO, TO, | |
(15) -> P, SP, TP, | |
(16) -> Q, SQ, TQ, | |
(17) -> R, SR, TR, | |
(18) -> S, SS, TS, | |
(19) -> T, ST, TT, | |
(20) -> U, SU, TU, | |
(21) -> V, SV, TV, | |
(22) -> W, SW, TW, | |
(23) -> X, SX, TX, | |
(24) -> Y, SY, TY, | |
(25) -> Z, SZ, TZ, | |
(26) -> AA, SAA, TAA, | |
(27) -> AB, SAB, TAB, | |
(28) -> AC, SAC, TAC, | |
(29) -> AD, SAD, TAD, | |
(30) -> AE, SAE, TAE, | |
} | |
} | |
__diesel_for_each_tuple!(30, $callback); | |
}; | |
(32, $callback: ident) => { | |
$callback! { | |
32 { | |
(0) -> A, SA, TA, | |
(1) -> B, SB, TB, | |
(2) -> C, SC, TC, | |
(3) -> D, SD, TD, | |
(4) -> E, SE, TE, | |
(5) -> F, SF, TF, | |
(6) -> G, SG, TG, | |
(7) -> H, SH, TH, | |
(8) -> I, SI, TI, | |
(9) -> J, SJ, TJ, | |
(10) -> K, SK, TK, | |
(11) -> L, SL, TL, | |
(12) -> M, SM, TM, | |
(13) -> N, SN, TN, | |
(14) -> O, SO, TO, | |
(15) -> P, SP, TP, | |
(16) -> Q, SQ, TQ, | |
(17) -> R, SR, TR, | |
(18) -> S, SS, TS, | |
(19) -> T, ST, TT, | |
(20) -> U, SU, TU, | |
(21) -> V, SV, TV, | |
(22) -> W, SW, TW, | |
(23) -> X, SX, TX, | |
(24) -> Y, SY, TY, | |
(25) -> Z, SZ, TZ, | |
(26) -> AA, SAA, TAA, | |
(27) -> AB, SAB, TAB, | |
(28) -> AC, SAC, TAC, | |
(29) -> AD, SAD, TAD, | |
(30) -> AE, SAE, TAE, | |
(31) -> AF, SAF, TAF, | |
} | |
} | |
__diesel_for_each_tuple!(31, $callback); | |
}; | |
} | |
__diesel_for_each_tuple!(16, tuple_impls); | |
fn main() { | |
println!("Hello, world!"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment