Skip to main content

Module layout

Module layout 

Source
Expand description

Type layout abstraction (ADR-0069).

Provides a single source of truth for size/alignment/niche information. All in-tree callers that previously computed sizes or alignments ad-hoc should consult layout_of instead.

Phase 1 of the ADR: types and layout_of exist; niches is always empty. Later phases populate niches and add the niche-encoded enum layout.

Structs§

Layout
The layout of a Gruel type: size, alignment, niches, and (for enums) its discriminant strategy.
NicheRange
A forbidden bit-pattern range within a value of some type.

Enums§

DiscriminantStrategy
How an enum encodes its discriminant within its storage.

Functions§

layout_of
Compute (or look up the cached) layout of ty.