pub enum OnChainConsensusConfig {
V1(ConsensusConfigV1),
}
Expand description
The on-chain consensus config, in order to be able to add fields, we use enum to wrap the actual struct.
Variants§
Implementations§
Trait Implementations§
source§impl Clone for OnChainConsensusConfig
impl Clone for OnChainConsensusConfig
source§fn clone(&self) -> OnChainConsensusConfig
fn clone(&self) -> OnChainConsensusConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for OnChainConsensusConfig
impl Debug for OnChainConsensusConfig
source§impl Default for OnChainConsensusConfig
impl Default for OnChainConsensusConfig
This is used when on-chain config is not initialized.
source§impl<'de> Deserialize<'de> for OnChainConsensusConfig
impl<'de> Deserialize<'de> for OnChainConsensusConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl OnChainConfig for OnChainConsensusConfig
impl OnChainConfig for OnChainConsensusConfig
source§fn deserialize_into_config(bytes: &[u8]) -> Result<Self>
fn deserialize_into_config(bytes: &[u8]) -> Result<Self>
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
const IDENTIFIER: &'static str = "DiemConsensusConfig"
const ADDRESS: &'static str = CONFIG_ADDRESS_STR
const CONFIG_ID: ConfigID = _
fn deserialize_default_impl(bytes: &[u8]) -> Result<Self>
fn fetch_config<T>(storage: &T) -> Option<Self>where T: ConfigStorage,
source§impl PartialEq<OnChainConsensusConfig> for OnChainConsensusConfig
impl PartialEq<OnChainConsensusConfig> for OnChainConsensusConfig
source§fn eq(&self, other: &OnChainConsensusConfig) -> bool
fn eq(&self, other: &OnChainConsensusConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for OnChainConsensusConfig
impl Serialize for OnChainConsensusConfig
impl StructuralPartialEq for OnChainConsensusConfig
Auto Trait Implementations§
impl RefUnwindSafe for OnChainConsensusConfig
impl Send for OnChainConsensusConfig
impl Sync for OnChainConsensusConfig
impl Unpin for OnChainConsensusConfig
impl UnwindSafe for OnChainConsensusConfig
Blanket Implementations§
source§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
source§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.