Trait LayoutSpec

Source
pub trait LayoutSpec {
    // Required method
    fn layout_with_capacity(items: usize) -> Result<Layout, LayoutError>;
}
Expand description

Types that specify a data structure’s storage layout requirements.

Required Methods§

Source

fn layout_with_capacity(items: usize) -> Result<Layout, LayoutError>

Constructs a Layout for a memory block capable of holding the specified number of items.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl LayoutSpec for ObjectLayout

Available on crate feature unstable only.
Source§

impl<K, V> LayoutSpec for ListMapLayout<K, V>

Source§

impl<T> LayoutSpec for ArrayLayout<T>

Source§

impl<T, H: Handle> LayoutSpec for DirectPoolLayout<T, H>

Source§

impl<T, H: Handle> LayoutSpec for PackedPoolLayout<T, H>