Attribute Macros§
- implementation
- This macro implements the default traits defined in pendzl, while also allowing users
to override them with
#[overrider]attribute.#[overrider]is used when you want to change the behavior of the method by your implementation. - storage_
item - The macro implements
ink::storage_itemmacro 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 following recomendation from https://use.ink/datastructures/storage-layout
Derive Macros§
- Storage
Field Getter - The macro implements
pendzl::traits::StorageFieldGettertrait 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.