Development · Evolving reference
NativeFieldLayout
Refines one field offset or alignment inside a profile-qualified native type.
Sn is under heavy development. This reference includes the intended 1.0 design; features may be incomplete in the current compiler. Read the status →
Module std.abi
import std.abi;Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.
NativeFieldLayout
pub attribute NativeFieldLayoutRefines one field offset or alignment inside a profile-qualified native type.
The requested alignment may raise but never lower the profile-selected field alignment; an offset must preserve nonoverlap and enclosing bounds.
NativeFieldLayout.Offset
pub Offset: usize?;Stores an optional exact byte offset.
NativeFieldLayout.Alignment
pub Alignment: usize?;Stores an optional power-of-two field alignment raise.
Documentation snapshot: October 24, 2026 About versions ↗