pub trait MemLocType<const ADDR: usize, const SIZE: usize> {
    type Type;

    const ADDR: usize = ADDR;
    const SIZE: usize = SIZE;
    const LOC: MemLoc<ADDR, SIZE> = _;

    // Provided method
    fn layout(loc: MemLoc<ADDR, SIZE>) -> LayoutType<ADDR, SIZE, Self> { ... }
}
Expand description

Trait that combines a memory location and a type.

Required Associated Types§

source

type Type

The type at this memory location.

Provided Associated Constants§

source

const ADDR: usize = ADDR

The memory locations address.

source

const SIZE: usize = SIZE

The memory locations size.

source

const LOC: MemLoc<ADDR, SIZE> = _

The memory location.

Provided Methods§

source

fn layout(loc: MemLoc<ADDR, SIZE>) -> LayoutType<ADDR, SIZE, Self>

Combine a memory location and a type. This will only work if this trait is defined for the memory location.

Implementors§