Attribute Macro frame_support::pallet_macros::constant

#[constant]
Expand description

The #[pallet::constant] attribute can be used to add an associated type trait bounded by Get from pallet::config into metadata.

Example

#[frame_support::pallet]
mod pallet {
    use frame_support::pallet_prelude::*;
    #[pallet::config]
    pub trait Config: frame_system::Config {
		/// This is like a normal `Get` trait, but it will be added into metadata.
		#[pallet::constant]
		type Foo: Get<u32>;
	}
}

Rust-Analyzer users: See the documentation of the Rust item in frame_support::pallet_macros::constant.