pub struct RecordLayout<'a> {
pub name: &'a str,
pub doc: Option<&'a str>,
pub is_union: bool,
pub size: Width,
pub align: Width,
pub fields: Vec<FieldLayout<'a>>,
pub alignas: Option<usize>,
pub slab_align: Option<usize>,
pub natural_align: Width,
}Expand description
C layout of one struct or union on both pointer widths.
Fields§
§name: &'a str§doc: Option<&'a str>§is_union: bool§size: Width§align: Width§fields: Vec<FieldLayout<'a>>§alignas: Option<usize>Rust #[repr(C, align(N <= 16))], reproduced in C with NV_ALIGNAS(N) (_Alignas /
alignas) whenever it exceeds some data model’s natural alignment.
slab_align: Option<usize>Rust align(N) that only aligns Rust-owned slabs (it changes no size and no containing
layout), so C keeps the natural alignment Swift’s ClangImporter imports as a plain value.
natural_align: WidthAlignment from the fields alone (before any alignas).
Implementations§
Trait Implementations§
Source§impl<'a> Clone for RecordLayout<'a>
impl<'a> Clone for RecordLayout<'a>
Auto Trait Implementations§
impl<'a> Forget for RecordLayout<'a>
impl<'a> Freeze for RecordLayout<'a>
impl<'a> Move for RecordLayout<'a>
impl<'a> RefUnwindSafe for RecordLayout<'a>
impl<'a> Send for RecordLayout<'a>
impl<'a> Sync for RecordLayout<'a>where
RawVecInner: Sync,
impl<'a> Unpin for RecordLayout<'a>
impl<'a> UnsafeUnpin for RecordLayout<'a>where
&'a str: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<FieldLayout<'a>>: UnsafeUnpin,
impl<'a> UnwindSafe for RecordLayout<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more