Module rustc::ty::layout [] [src]

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

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Reexports

pub use self::Integer::*;
pub use self::Layout::*;
pub use self::Primitive::*;

Structs

Align [
Experimental
]

Alignment of a type in bytes, both ABI-mandated and preferred. Each field is a power of two, giving the alignment a maximum value of 228 - 1, which is limited by LLVM to a i32, with a maximum capacity of 231 - 1 or 2147483647.

LayoutCx [
Experimental
]

Combines a tcx with the parameter environment so that you can compute layout operations.

Size [
Experimental
]

Size of a type in bytes.

Struct [
Experimental
]

A structure, a product type in ADT terms.

TargetDataLayout [
Experimental
]

Parsed Data layout for a target, which contains everything needed to compute layouts.

TyLayout [
Experimental
]

A pair of a type and its layout. Implements various type traversal APIs (e.g. recursing into fields).

Union [
Experimental
]

An untagged union.

Enums

Endian [
Experimental
]

Endianness of the target, which must match cfg(target-endian).

Integer [
Experimental
]

Integers, also used for enum discriminants.

Layout [
Experimental
]

Type layout, from which size and alignment can be cheaply computed. For ADTs, it also includes field placement and enum optimizations. NOTE: Because Layout is interned, redundant information should be kept to a minimum, e.g. it includes no sub-component Ty or Layout.

LayoutError [
Experimental
]
Primitive [
Experimental
]

Fundamental unit of memory access and layout.

SizeSkeleton [
Experimental
]

Type size "skeleton", i.e. the only information determining a type's size. While this is conservative, (aside from constant sizes, only pointers, newtypes thereof and null pointer optimized enums are allowed), it is enough to statically check common usecases of transmute.

Constants

FAT_PTR_ADDR [
Experimental
]

The first half of a fat pointer. - For a trait object, this is the address of the box. - For a slice, this is the base address.

FAT_PTR_EXTRA [
Experimental
]

The second half of a fat pointer. - For a trait object, this is the address of the vtable. - For a slice, this is the length.

Traits

HasDataLayout [
Experimental
]
LayoutTyper [
Experimental
]

Type Definitions

FieldPath [
Experimental
]

Path through fields of nested structures.