Enum rustc_target::abi::FieldPlacement[][src]

pub enum FieldPlacement {
    Union(usize),
    Array {
        stride: Size,
        count: u64,
    },
    Arbitrary {
        offsets: Vec<Size>,
        memory_index: Vec<u32>,
    },
}

Describes how the fields of a type are located in memory.

Variants

All fields start at no offset. The usize is the field count.

Array/vector-like placement, with all fields of identical types.

Fields of Array

Struct-like placement, with precomputed offsets.

Fields are guaranteed to not overlap, but note that gaps before, between and after all the fields are NOT always padding, and as such their contents may not be discarded. For example, enum variants leave a gap at the start, where the discriminant field in the enum layout goes.

Fields of Arbitrary

Offsets for the first byte of each field, ordered to match the source definition order. This vector does not go in increasing order.

Maps source order field indices to memory order indices, depending how fields were permuted.

Methods

impl FieldPlacement
[src]

Get source indices of the fields by increasing offsets.

Trait Implementations

impl PartialEq for FieldPlacement
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for FieldPlacement
[src]

impl Hash for FieldPlacement
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for FieldPlacement
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations