abi_stable/
internal_macros.rs

1#[doc(hidden)]
2#[macro_export]
3macro_rules! _sabi_type_layouts {
4    (internal; $ty:ty )=>{{
5        $crate::pmr::get_type_layout::<$ty>
6    }};
7    (internal; $ty:ty = SABI_OPAQUE_FIELD)=>{
8        $crate::pmr::__sabi_opaque_field_type_layout::<$ty>
9    };
10    (internal; $ty:ty = OPAQUE_FIELD)=>{
11        $crate::pmr::__opaque_field_type_layout::<$ty>
12    };
13    (
14        $( $ty:ty $( = $assoc_const:ident )? ,)*
15    ) => {{
16        $crate::rslice![
17            $(
18                $crate::_sabi_type_layouts!(internal; $ty $( = $assoc_const )? ),
19            )*
20        ]
21    }};
22}