Skip to main content

ValueWidthPolicy

Trait ValueWidthPolicy 

Source
pub trait ValueWidthPolicy {
    type Value;

    // Required method
    fn width(value: &Self::Value) -> usize;
}
Expand description

Accounts values in consumer-defined logical storage units.

For example, a WebAssembly value policy or a Forth cell policy can supply it.

Required Associated Types§

Source

type Value

A machine value whose representation remains consumer-owned.

Required Methods§

Source

fn width(value: &Self::Value) -> usize

Returns the nonzero logical width charged for value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§