Trait linera_witty::Layout

source ·
pub trait Layout: Sealed + HList {
    type Flat: FlatLayout;

    const ALIGNMENT: u32;

    // Required method
    fn flatten(self) -> Self::Flat;
}
Expand description

Representation of the memory layout of complex types as a sequence of fundamental WIT types.

Required Associated Types§

source

type Flat: FlatLayout

Result of flattening this layout.

Required Associated Constants§

source

const ALIGNMENT: u32

The alignment boundary required for the layout.

Required Methods§

source

fn flatten(self) -> Self::Flat

Flattens this layout into a layout consisting of native WebAssembly types.

The resulting flat layout does not have any empty items.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Layout for HNil

source§

const ALIGNMENT: u32 = 1u32

§

type Flat = HNil

source§

impl<Head, Tail> Layout for HCons<Head, Tail>
where Head: LayoutElement, Tail: Layout,

source§

const ALIGNMENT: u32 = _

§

type Flat = <<Head as LayoutElement>::Flat as MaybeFlatType>::Flatten<Tail>