Crate pendzl_lang_macro
source ·Attribute Macros
- The macro implements
ink::storage_item
macro for the struct, which means that it prepares your struct to be a part of contract’s storage. Also, inside of struct marked by this macro you can use#[lazy]
attribute to mark fields, that should be lazily loaded and wrapped in::ink::storage::Lazy
. The macro also generates constant storage keys for every mapping or lazy field and inserts them into type definition.
Derive Macros
- The macro implements
pendzl::traits::Storage
trait for each field marked by#[storage_field]
attribute, so it will be possible to access them viaself.data::<Type>()
method. It is mostly used for pendzl to understand which fields should be accessed by traits.