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§

impl StorageLayout for char

source§

impl StorageLayout for i8

source§

impl StorageLayout for i16

source§

impl StorageLayout for i32

source§

impl StorageLayout for i64

source§

impl StorageLayout for i128

source§

impl StorageLayout for u8

source§

impl StorageLayout for u16

source§

impl StorageLayout for u32

source§

impl StorageLayout for u64

source§

impl StorageLayout for u128

source§

impl StorageLayout for ()

source§

impl StorageLayout for String

source§

impl StorageLayout for AccountId

source§

impl StorageLayout for Hash

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

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§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

Implementors§