pub fn forward_allocate_packed<T>(ptr: &mut KeyPtr) -> T where
    T: PackedAllocate + Default
Expand description

Allocates an instance of type T in packed fashion to the contract storage.

This default initializes the entity at the storage location identified by ptr. The storage entity is expected to be decodable in its packed form.

Note

Use this utility function to use a packed allocate operation for the type instead of a spread storage layout allocation operation.