[][src]Macro sp_externalities::decl_extension

macro_rules! decl_extension {
    (
		$( #[ $attr:meta ] )*
		$vis:vis struct $ext_name:ident ($inner:ty);
	) => { ... };
}

Macro for declaring an extension that usable with Extensions.

The extension will be an unit wrapper struct that implements Extension, Deref and DerefMut. The wrapped type is given by the user.

Example

decl_extension! {
    /// Some test extension
    struct TestExt(String);
}