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§
§impl Clone for OnChainConsensusConfig
impl Clone for OnChainConsensusConfig
§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 more§impl Debug for OnChainConsensusConfig
impl Debug for OnChainConsensusConfig
§impl Default for OnChainConsensusConfig
impl Default for OnChainConsensusConfig
This is used when on-chain config is not initialized.
§fn default() -> OnChainConsensusConfig
fn default() -> OnChainConsensusConfig
Returns the “default value” for a type. Read more
§impl<'de> Deserialize<'de> for OnChainConsensusConfig
impl<'de> Deserialize<'de> for OnChainConsensusConfig
§fn deserialize<__D>(
__deserializer: __D
) -> Result<OnChainConsensusConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<OnChainConsensusConfig, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl OnChainConfig for OnChainConsensusConfig
impl OnChainConfig for OnChainConsensusConfig
§fn deserialize_into_config(
bytes: &[u8]
) -> Result<OnChainConsensusConfig, Error>
fn deserialize_into_config( bytes: &[u8] ) -> Result<OnChainConsensusConfig, Error>
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 = ConfigID(Self::ADDRESS, Self::IDENTIFIER)
fn deserialize_default_impl(bytes: &[u8]) -> Result<Self, Error>
fn fetch_config<T>(storage: &T) -> Option<Self>where T: ConfigStorage,
§impl PartialEq<OnChainConsensusConfig> for OnChainConsensusConfig
impl PartialEq<OnChainConsensusConfig> for OnChainConsensusConfig
§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 ==
.§impl Serialize for OnChainConsensusConfig
impl Serialize for OnChainConsensusConfig
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.