Crate frame_support_procedural
source ·Expand description
Proc macro of Support code for the runtime.
Macros§
- Internal macro used by
frame_supportto create tt-call-compliant macros - Internal macro use by frame_support to generate dummy part checker for old pallet declaration
- Construct a runtime, with the given name and the given pallets.
- Macro used internally in FRAME to generate the crate version for a pallet.
- This macro is meant to be used by frame-support only. It implements the trait
HasKeyPrefixandHasReversibleKeyPrefixfor tuple ofKey. - Macro that inserts some tokens after the first match of some pattern.
Attribute Macros§
- An attribute macro used to declare a benchmark within a benchmarking module. Must be attached to a function definition containing an
#[extrinsic_call]or#[block]attribute. - An attribute macro that can be attached to a (non-empty) module declaration. Doing so will designate that module as a benchmarking module.
- An attribute macro used to specify that a block should be the measured portion of the enclosing benchmark function, This attribute is also used as a boundary designating where the benchmark setup code ends, and the benchmark verification code begins.
- Each dispatchable may also be annotated with the
#[pallet::call_index($idx)]attribute, which explicitly defines the codec index for the dispatchable function in theCallenum.
- This attribute can be used to derive a full implementation of a trait based on a local partial impl and an external impl containing defaults that can be overridden in the local impl.
- Define a module inside a
dynamic_paramsmodule that contains dynamic parameters. - Mark a module that contains dynamic parameters.
- An attribute macro used to specify the extrinsic call inside a benchmark function, and also used as a boundary designating where the benchmark setup code ends, and the benchmark verification code begins.
- An attribute macro that can be attached to a (non-empty) module declaration. Doing so will designate that module as an instance benchmarking module.
- Attach this attribute to an impl statement that you want to use with
#[derive_impl(..)].
- Execute the annotated function in a new storage transaction.
Derive Macros§
- Derive
Clonebut do not bound any generic. - Derive
Debugbut do not bound any generics. - derive
Defaultbut do no bound any generic. Docs are atframe_support::DefaultNoBound. - DeriveEq but do no bound any generic.
- Derive
Ordbut do no bound any generic. Docs are atframe_support::OrdNoBound. - Derive
PartialEqbut do not bound any generic. - Derive
PartialOrdbut do not bound any generic. Docs are atframe_support::PartialOrdNoBound. - Derive
Debug, ifstdis enabled it usesframe_support::DebugNoBound, ifstdis not enabled it just returns"<wasm:stripped>". This behaviour is useful to prevent bloating the runtime WASM blob from unneeded code.