marks the contract as having storage, so that macros::utils::module_has_storage will return true,
marks the struct s as the one describing the storage layout of a contract,
generates an impl block for the storage struct with an init function (call to init is then injected at the
beginning of every #[external(...)] and #[internal] contract function and the storage is then available as
self.storage),
creates a StorageLayout struct that is is exposed via the abi(storage) macro in the contract artifact.
Only a single struct in the entire contract should have this macro (or storage_no_init) applied to it, and the
struct has to be called 'Storage'.
This function
macros::utils::module_has_storagewill return true,sas the one describing the storage layout of a contract,implblock for the storage struct with aninitfunction (call toinitis then injected at the beginning of every#[external(...)]and#[internal]contract function and the storage is then available asself.storage),StorageLayoutstruct that is is exposed via theabi(storage)macro in the contract artifact.Only a single struct in the entire contract should have this macro (or
storage_no_init) applied to it, and the struct has to be called 'Storage'.