Crate near_sdk_macros[−][src]
Macros
metadata
generates the metadata method and should be placed at the very end of the lib.rs
file.
Attribute Macros
callback
is a marker attribute it does not generate code by itself.
callback_args_vec
is a marker attribute it does not generate code by itself.
init
is a marker attribute it does not generate code by itself.
result_serializer
is a marker attribute it does not generate code by itself.
serializer
is a marker attribute it does not generate code by itself.
Derive Macros
BorshStorageKey
generates implementation for BorshIntoStorageKey
trait.
It allows the type to be passed as a unique prefix for persistent collections.
The type should also implement or derive BorshSerialize
trait.
PanicOnDefault
generates implementation for Default
trait that panics with the following
message The contract is not initialized
when default()
is called.
This is a helpful macro in case the contract is required to be initialized with either init
or
init(ignore_state)
.