Trait diem_rest_client::dpn::OnChainConfig[][src]

pub trait OnChainConfig: Send + Sync + DeserializeOwned {
    const ADDRESS: &'static str;
    const IDENTIFIER: &'static str;
    const CONFIG_ID: ConfigID;
    fn deserialize_default_impl(bytes: &[u8]) -> Result<Self, Error> { ... }
fn deserialize_into_config(bytes: &[u8]) -> Result<Self, Error> { ... }
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

Associated Constants

Provided methods

Implementations on Foreign Types

The Move resource is

struct DiemConsensusConfig has copy, drop, store {
   config: vector<u8>,
}

so we need two rounds of bcs deserilization to turn it back to OnChainConsensusConfig

Implementors