Struct rustc::ty::layout::Struct [] [src]

pub struct Struct {
    pub align: Align,
    pub packed: bool,
    pub sized: bool,
    pub offsets: Vec<Size>,
    pub memory_index: Vec<u32>,
    pub min_size: Size,
}
🔬 This is a nightly-only experimental API. (rustc_private)

A structure, a product type in ADT terms.

Fields

🔬 This is a nightly-only experimental API. (rustc_private)
🔬 This is a nightly-only experimental API. (rustc_private)

If true, no alignment padding is used.

🔬 This is a nightly-only experimental API. (rustc_private)

If true, the size is exact, otherwise it's only a lower bound.

🔬 This is a nightly-only experimental API. (rustc_private)

Offsets for the first byte of each field, ordered to match the source definition order. This vector does not go in increasing order. FIXME(eddyb) use small vector optimization for the common case.

🔬 This is a nightly-only experimental API. (rustc_private)

Maps source order field indices to memory order indices, depending how fields were permuted. FIXME (camlorn) also consider small vector optimization here.

🔬 This is a nightly-only experimental API. (rustc_private)

Methods

impl<'a, 'gcx, 'tcx> Struct
[src]

🔬 This is a nightly-only experimental API. (rustc_private)

Get the size with trailing alignment padding.

🔬 This is a nightly-only experimental API. (rustc_private)

Determine whether a structure would be zero-sized, given its fields.

🔬 This is a nightly-only experimental API. (rustc_private)

Get indices of the tys that made this struct by increasing offset.

Trait Implementations

impl PartialEq for Struct
[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 Struct
[src]

impl Hash for Struct
[src]

Feeds this value into the state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.

impl Debug for Struct
[src]

Formats the value using the given formatter.