[][src]Trait dioptre::Fields

pub unsafe trait Fields {
    const OFFSETS: &'static [fn(_: *mut u8) -> usize];
    const SIZES: &'static [usize];
    const ALIGNS: &'static [usize];
}

Layout metadata for a struct.

This trait should not normally be implemented by hand. Instead, use #[derive(Fields)]- this will safely generate the appropriate trait impl as well as associated const Fields.

Safety

  • OFFSETS, SIZES and ALIGNS must accurately describe Self's fields.

Associated Constants

const OFFSETS: &'static [fn(_: *mut u8) -> usize]

The offsets of individual struct elements.

const SIZES: &'static [usize]

The sizes of individual struct elements.

const ALIGNS: &'static [usize]

The alignments of individual struct elements.

Loading content...

Implementors

Loading content...