Struct diem_types::validator_config::ValidatorConfig
source · pub struct ValidatorConfig {
pub consensus_public_key: Ed25519PublicKey,
pub validator_network_addresses: Vec<u8>,
pub fullnode_network_addresses: Vec<u8>,
}
Fields§
§consensus_public_key: Ed25519PublicKey
§validator_network_addresses: Vec<u8>
This is an bcs serialized Vec
fullnode_network_addresses: Vec<u8>
This is an bcs serialized Vec
Implementations§
source§impl ValidatorConfig
impl ValidatorConfig
pub fn new( consensus_public_key: Ed25519PublicKey, validator_network_addresses: Vec<u8>, fullnode_network_addresses: Vec<u8> ) -> Self
pub fn fullnode_network_addresses(&self) -> Result<Vec<NetworkAddress>, Error>
pub fn validator_network_addresses( &self ) -> Result<Vec<EncNetworkAddress>, Error>
Trait Implementations§
source§impl Arbitrary for ValidatorConfig
impl Arbitrary for ValidatorConfig
§type Parameters = (<Ed25519PublicKey as Arbitrary>::Parameters, <Vec<u8, Global> as Arbitrary>::Parameters, <Vec<u8, Global> as Arbitrary>::Parameters)
type Parameters = (<Ed25519PublicKey as Arbitrary>::Parameters, <Vec<u8, Global> as Arbitrary>::Parameters, <Vec<u8, Global> as Arbitrary>::Parameters)
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = Map<(<Ed25519PublicKey as Arbitrary>::Strategy, <Vec<u8, Global> as Arbitrary>::Strategy, <Vec<u8, Global> as Arbitrary>::Strategy), fn(_: (Ed25519PublicKey, Vec<u8, Global>, Vec<u8, Global>)) -> ValidatorConfig>
type Strategy = Map<(<Ed25519PublicKey as Arbitrary>::Strategy, <Vec<u8, Global> as Arbitrary>::Strategy, <Vec<u8, Global> as Arbitrary>::Strategy), fn(_: (Ed25519PublicKey, Vec<u8, Global>, Vec<u8, Global>)) -> ValidatorConfig>
The type of
Strategy
used to generate values of type Self
.source§fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
source§impl Clone for ValidatorConfig
impl Clone for ValidatorConfig
source§fn clone(&self) -> ValidatorConfig
fn clone(&self) -> ValidatorConfig
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 ValidatorConfig
impl Debug for ValidatorConfig
source§impl<'de> Deserialize<'de> for ValidatorConfig
impl<'de> Deserialize<'de> for ValidatorConfig
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 PartialEq<ValidatorConfig> for ValidatorConfig
impl PartialEq<ValidatorConfig> for ValidatorConfig
source§fn eq(&self, other: &ValidatorConfig) -> bool
fn eq(&self, other: &ValidatorConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ValidatorConfig
impl Serialize for ValidatorConfig
impl Eq for ValidatorConfig
impl StructuralEq for ValidatorConfig
impl StructuralPartialEq for ValidatorConfig
Auto Trait Implementations§
impl RefUnwindSafe for ValidatorConfig
impl Send for ValidatorConfig
impl Sync for ValidatorConfig
impl Unpin for ValidatorConfig
impl UnwindSafe for ValidatorConfig
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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.