pub trait OnChainConfig: Send + Sync + DeserializeOwned {
    const IDENTIFIER: &'static str;
    const ADDRESS: &'static str = CONFIG_ADDRESS_STR;
    const CONFIG_ID: ConfigID = _;

    // Provided methods
    fn deserialize_default_impl(bytes: &[u8]) -> Result<Self> { ... }
    fn deserialize_into_config(bytes: &[u8]) -> Result<Self> { ... }
    fn fetch_config<T>(storage: &T) -> Option<Self>
       where T: ConfigStorage { ... }
}
Expand description

Trait to be implemented by a Rust struct representation of an on-chain config that is stored in storage as a serialized byte array

Required Associated Constants§

source

const IDENTIFIER: &'static str

Provided Associated Constants§

source

const ADDRESS: &'static str = CONFIG_ADDRESS_STR

source

const CONFIG_ID: ConfigID = _

Provided Methods§

source

fn deserialize_default_impl(bytes: &[u8]) -> Result<Self>

source

fn deserialize_into_config(bytes: &[u8]) -> Result<Self>

source

fn fetch_config<T>(storage: &T) -> Option<Self>where T: ConfigStorage,

Implementors§

source§

impl OnChainConfig for OnChainConsensusConfig

source§

const IDENTIFIER: &'static str = "DiemConsensusConfig"

source§

impl OnChainConfig for Limit

source§

const IDENTIFIER: &'static str = "Limit"

source§

impl OnChainConfig for DiemVersion

source§

const IDENTIFIER: &'static str = "DiemVersion"

source§

impl OnChainConfig for RegisteredCurrencies

source§

const IDENTIFIER: &'static str = "RegisteredCurrencies"

source§

impl OnChainConfig for VMConfig

source§

const IDENTIFIER: &'static str = "DiemVMConfig"

source§

impl OnChainConfig for VMPublishingOption

source§

const IDENTIFIER: &'static str = "DiemTransactionPublishingOption"

source§

impl OnChainConfig for ValidatorSet

source§

const IDENTIFIER: &'static str = "DiemSystem"