layout

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package layout computes the memory layout of named structs in a Target, returning the per-field offset/size/align/padding as data (no rendering).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Inspector

type Inspector struct{}

Inspector implements common.Inspector.

func New

func New() *Inspector

New returns an Inspector.

func (*Inspector) Layouts

func (i *Inspector) Layouts(t common.Target, opts common.Options) []common.Layout

Layouts returns the layout of each named struct in t controlled by opts (nil patterns = all). A generic type has no concrete layout until it is instantiated, so it is measured with each type parameter replaced by a representative type (its constraint's core type, else interface{}) and the returned Layout carries a Note disclaiming the approximation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL