macro_rules! impl_function_traits {
(
$ty: ty
$(;
< $($T: ident $(: $T1: tt $(+ $T2: tt)*)?),* >
)?
$(
[ $(const $N: ident : $size: ident),* ]
)?
$(
where $($U: ty $(: $U1: tt $(+ $U2: tt)*)?),*
)?
) => {
$crate::func::args::impl_get_ownership!(
$ty
$(;
< $($T $(: $T1 $(+ $T2)*)?),* >
)?
$(
[ $(const $N : $size),* ]
)?
$(
where $($U $(: $U1 $(+ $U2)*)?),*
)?
);
$crate::func::args::impl_from_arg!(
$ty
$(;
< $($T $(: $T1 $(+ $T2)*)?),* >
)?
$(
[ $(const $N : $size),* ]
)?
$(
where $($U $(: $U1 $(+ $U2)*)?),*
)?
);
$crate::func::impl_into_return!(
$ty
$(;
< $($T $(: $T1 $(+ $T2)*)?),* >
)?
$(
[ $(const $N : $size),* ]
)?
$(
where $($U $(: $U1 $(+ $U2)*)?),*
)?
);
};
}
pub(crate) use impl_function_traits;
macro_rules! count_tokens {
() => { 0 };
($odd:tt $($a:tt $b:tt)*) => { ($crate::func::macros::count_tokens!($($a)*) << 1) | 1 };
($($a:tt $even:tt)*) => { $crate::func::macros::count_tokens!($($a)*) << 1 };
}
pub(crate) use count_tokens;