Trait frame_support::traits::GetPalletVersion[][src]

pub trait GetPalletVersion {
    fn current_version() -> PalletVersion;
fn storage_version() -> Option<PalletVersion>; }

Provides version information about a pallet.

This trait provides two functions for returning the version of a pallet. There is a state where both functions can return distinct versions. See GetPalletVersion::storage_version for more information about this.

Required methods

fn current_version() -> PalletVersion[src]

Returns the current version of the pallet.

fn storage_version() -> Option<PalletVersion>[src]

Returns the version of the pallet that is stored in storage.

Most of the time this will return the exact same version as GetPalletVersion::current_version. Only when being in a state after a runtime upgrade happened and the pallet did not yet updated its version in storage, this will return a different(the previous, seen from the time of calling) version.

See PalletVersion for more information.

Note

If there was no previous version of the pallet stored in the state, this function returns None.

Loading content...

Implementors

Loading content...