Trait ink_storage_traits::StorageLayout

source ·
pub trait StorageLayout {
    // Required method
    fn layout(key: &Key) -> Layout;
}
Expand description

Implemented by types that have a storage layout.

Required Methods§

source

fn layout(key: &Key) -> Layout

Returns the static storage layout of Self.

The given storage key is guiding the allocation of static fields onto the contract storage regions.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl StorageLayout for bool

source§

fn layout(key: &Key) -> Layout

source§

impl StorageLayout for char

source§

fn layout(key: &Key) -> Layout

source§

impl StorageLayout for i8

source§

fn layout(key: &Key) -> Layout

source§

impl StorageLayout for i16

source§

fn layout(key: &Key) -> Layout

source§

impl StorageLayout for i32

source§

fn layout(key: &Key) -> Layout

source§

impl StorageLayout for i64

source§

fn layout(key: &Key) -> Layout

source§

impl StorageLayout for i128

source§

fn layout(key: &Key) -> Layout

source§

impl StorageLayout for u8

source§

fn layout(key: &Key) -> Layout

source§

impl StorageLayout for u16

source§

fn layout(key: &Key) -> Layout

source§

impl StorageLayout for u32

source§

fn layout(key: &Key) -> Layout

source§

impl StorageLayout for u64

source§

fn layout(key: &Key) -> Layout

source§

impl StorageLayout for u128

source§

fn layout(key: &Key) -> Layout

source§

impl StorageLayout for ()

source§

fn layout(key: &Key) -> Layout

source§

impl StorageLayout for AccountId

source§

fn layout(key: &Key) -> Layout

source§

impl StorageLayout for Hash

source§

fn layout(key: &Key) -> Layout

source§

impl StorageLayout for String

source§

fn layout(key: &Key) -> Layout

source§

impl<A> StorageLayout for (A,)
where A: StorageLayout,

source§

fn layout(key: &Key) -> Layout

source§

impl<A, B> StorageLayout for (A, B)

source§

fn layout(key: &Key) -> Layout

source§

impl<A, B, C> StorageLayout for (A, B, C)

source§

fn layout(key: &Key) -> Layout

source§

impl<A, B, C, D> StorageLayout for (A, B, C, D)

source§

fn layout(key: &Key) -> Layout

source§

impl<A, B, C, D, E> StorageLayout for (A, B, C, D, E)

source§

fn layout(key: &Key) -> Layout

source§

impl<A, B, C, D, E, F> StorageLayout for (A, B, C, D, E, F)

source§

fn layout(key: &Key) -> Layout

source§

impl<A, B, C, D, E, F, G> StorageLayout for (A, B, C, D, E, F, G)

source§

fn layout(key: &Key) -> Layout

source§

impl<A, B, C, D, E, F, G, H> StorageLayout for (A, B, C, D, E, F, G, H)

source§

fn layout(key: &Key) -> Layout

source§

impl<A, B, C, D, E, F, G, H, I> StorageLayout for (A, B, C, D, E, F, G, H, I)

source§

fn layout(key: &Key) -> Layout

source§

impl<A, B, C, D, E, F, G, H, I, J> StorageLayout for (A, B, C, D, E, F, G, H, I, J)

source§

fn layout(key: &Key) -> Layout

source§

impl<K, V> StorageLayout for BTreeMap<K, V>
where K: TypeInfo + 'static + Packed, V: TypeInfo + 'static + Packed,

source§

fn layout(key: &Key) -> Layout

source§

impl<T> StorageLayout for Option<T>
where T: StorageLayout,

source§

fn layout(key: &Key) -> Layout

source§

impl<T> StorageLayout for Box<T>
where T: StorageLayout,

source§

fn layout(key: &Key) -> Layout

source§

impl<T> StorageLayout for BTreeSet<T>
where T: TypeInfo + 'static + Packed,

source§

fn layout(key: &Key) -> Layout

source§

impl<T> StorageLayout for VecDeque<T>
where T: TypeInfo + 'static + Packed,

source§

fn layout(key: &Key) -> Layout

source§

impl<T> StorageLayout for Vec<T>
where T: TypeInfo + 'static + Packed,

source§

fn layout(key: &Key) -> Layout

source§

impl<T, E> StorageLayout for Result<T, E>

source§

fn layout(key: &Key) -> Layout

source§

impl<T, const N: usize> StorageLayout for [T; N]
where T: StorageLayout + Packed,

source§

fn layout(key: &Key) -> Layout

Implementors§