Trait GenesisBuild

Source
pub trait GenesisBuild<T, I = ()>: MaybeSerializeDeserialize {
    // Required method
    fn build(&self);

    // Provided methods
    fn build_storage(&self) -> Result<Storage, String> { ... }
    fn assimilate_storage(&self, storage: &mut Storage) -> Result<(), String> { ... }
}
๐Ÿ‘ŽDeprecated: GenesisBuild is planned to be removed in December 2023. Use BuildGenesisConfig instead of it.
Expand description

A trait to define the build function of a genesis config, T and I are placeholder for pallet trait and pallet instance.

Required Methodsยง

Source

fn build(&self)

๐Ÿ‘ŽDeprecated: GenesisBuild is planned to be removed in December 2023. Use BuildGenesisConfig instead of it.

The build function is called within an externalities allowing storage APIs. Thus one can write to storage using regular pallet storages.

Provided Methodsยง

Source

fn build_storage(&self) -> Result<Storage, String>

๐Ÿ‘ŽDeprecated: GenesisBuild is planned to be removed in December 2023. Use BuildGenesisConfig instead of it.

Build the storage using build inside default storage.

Source

fn assimilate_storage(&self, storage: &mut Storage) -> Result<(), String>

๐Ÿ‘ŽDeprecated: GenesisBuild is planned to be removed in December 2023. Use BuildGenesisConfig instead of it.

Assimilate the storage for this module into pre-existing overlays.

Dyn Compatibilityยง

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementorsยง