diesel/macros/
internal.rs1#[macro_export]
8#[doc(hidden)]
9macro_rules! impl_selectable_expression {
10 ($struct_name:ident) => {
11 $crate::impl_selectable_expression!(ty_params = (), struct_ty = $struct_name,);
12 };
13
14 ($struct_name:ident<$($ty_params:ident),+>) => {
15 $crate::impl_selectable_expression!(
16 ty_params = ($($ty_params),+),
17 struct_ty = $struct_name<$($ty_params),+>,
18 );
19 };
20
21 (ty_params = ($($ty_params:ident),*), struct_ty = $struct_ty:ty,) => {
22 impl<$($ty_params,)* QS> $crate::expression::SelectableExpression<QS>
23 for $struct_ty where
24 $struct_ty: $crate::expression::AppearsOnTable<QS>,
25 $($ty_params: $crate::expression::SelectableExpression<QS>,)*
26 {
27 }
28
29 impl<$($ty_params,)* QS> $crate::expression::AppearsOnTable<QS>
30 for $struct_ty where
31 $struct_ty: $crate::expression::Expression,
32 $($ty_params: $crate::expression::AppearsOnTable<QS>,)*
33 {
34 }
35 };
36}