pub unsafe trait Params {
    type Limit: LimitParam;

    // Required methods
    fn layout(&self) -> Layout;
    fn tolerance(&self) -> Layout;
    fn limit(&self) -> &Self::Limit;
}
Expand description

§Safety

All methods should return constants, i.e. same values on every call.

Returned values should satisfy tolerance().size() <= layout().size() && tolerance().align() <= layout().align(), and layout.size() >= MIN_LAYOUT_SIZE && layout.align() >= MIN_LAYOUT_ALIGN.

Required Associated Types§

Required Methods§

source

fn layout(&self) -> Layout

source

fn tolerance(&self) -> Layout

source

fn limit(&self) -> &Self::Limit

Implementors§

source§

impl<Limit: LimitParam> Params for RtParams<Limit>

§

type Limit = Limit

source§

impl<const LAYOUT_SIZE: usize, const LAYOUT_ALIGN: usize, const TOLERANCE_SIZE: usize, const TOLERANCE_ALIGN: usize, Limit: LimitParam> Params for CtParams<LAYOUT_SIZE, LAYOUT_ALIGN, TOLERANCE_SIZE, TOLERANCE_ALIGN, Limit>

§

type Limit = Limit