Struct diem_types::on_chain_config::ValidatorSet
source · pub struct ValidatorSet { /* private fields */ }
Implementations§
source§impl ValidatorSet
impl ValidatorSet
sourcepub fn new(payload: Vec<ValidatorInfo>) -> Self
pub fn new(payload: Vec<ValidatorInfo>) -> Self
Constructs a ValidatorSet resource.
pub fn payload(&self) -> &[ValidatorInfo]
pub fn empty() -> Self
Trait Implementations§
source§impl Arbitrary for ValidatorSet
impl Arbitrary for ValidatorSet
§type Parameters = (<ConsensusScheme as Arbitrary>::Parameters, <Vec<ValidatorInfo, Global> as Arbitrary>::Parameters)
type Parameters = (<ConsensusScheme as Arbitrary>::Parameters, <Vec<ValidatorInfo, 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<(<ConsensusScheme as Arbitrary>::Strategy, <Vec<ValidatorInfo, Global> as Arbitrary>::Strategy), fn(_: (ConsensusScheme, Vec<ValidatorInfo, Global>)) -> ValidatorSet>
type Strategy = Map<(<ConsensusScheme as Arbitrary>::Strategy, <Vec<ValidatorInfo, Global> as Arbitrary>::Strategy), fn(_: (ConsensusScheme, Vec<ValidatorInfo, Global>)) -> ValidatorSet>
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 ValidatorSet
impl Clone for ValidatorSet
source§fn clone(&self) -> ValidatorSet
fn clone(&self) -> ValidatorSet
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 ValidatorSet
impl Debug for ValidatorSet
source§impl<'de> Deserialize<'de> for ValidatorSet
impl<'de> Deserialize<'de> for ValidatorSet
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 Display for ValidatorSet
impl Display for ValidatorSet
source§impl From<&ValidatorSet> for ValidatorVerifier
impl From<&ValidatorSet> for ValidatorVerifier
source§fn from(validator_set: &ValidatorSet) -> Self
fn from(validator_set: &ValidatorSet) -> Self
Converts to this type from the input type.
source§impl From<&ValidatorVerifier> for ValidatorSet
impl From<&ValidatorVerifier> for ValidatorSet
source§fn from(verifier: &ValidatorVerifier) -> Self
fn from(verifier: &ValidatorVerifier) -> Self
Converts to this type from the input type.
source§impl IntoIterator for ValidatorSet
impl IntoIterator for ValidatorSet
§type Item = ValidatorInfo
type Item = ValidatorInfo
The type of the elements being iterated over.
§type IntoIter = IntoIter<<ValidatorSet as IntoIterator>::Item, Global>
type IntoIter = IntoIter<<ValidatorSet as IntoIterator>::Item, Global>
Which kind of iterator are we turning this into?
source§impl OnChainConfig for ValidatorSet
impl OnChainConfig for ValidatorSet
const IDENTIFIER: &'static str = "DiemSystem"
const ADDRESS: &'static str = CONFIG_ADDRESS_STR
const CONFIG_ID: ConfigID = _
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,
source§impl PartialEq<ValidatorSet> for ValidatorSet
impl PartialEq<ValidatorSet> for ValidatorSet
source§fn eq(&self, other: &ValidatorSet) -> bool
fn eq(&self, other: &ValidatorSet) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ValidatorSet
impl Serialize for ValidatorSet
impl Eq for ValidatorSet
impl StructuralEq for ValidatorSet
impl StructuralPartialEq for ValidatorSet
Auto Trait Implementations§
impl RefUnwindSafe for ValidatorSet
impl Send for ValidatorSet
impl Sync for ValidatorSet
impl Unpin for ValidatorSet
impl UnwindSafe for ValidatorSet
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.