Struct diem_sdk::types::on_chain_config::ValidatorSet
pub struct ValidatorSet { /* private fields */ }
Implementations§
§impl ValidatorSet
impl ValidatorSet
pub fn new(payload: Vec<ValidatorInfo, Global>) -> ValidatorSet
pub fn new(payload: Vec<ValidatorInfo, Global>) -> ValidatorSet
Constructs a ValidatorSet resource.
pub fn payload(&self) -> &[ValidatorInfo]
pub fn empty() -> ValidatorSet
Trait Implementations§
§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
.§fn arbitrary_with(
_top: <ValidatorSet as Arbitrary>::Parameters
) -> <ValidatorSet as Arbitrary>::Strategy
fn arbitrary_with( _top: <ValidatorSet as Arbitrary>::Parameters ) -> <ValidatorSet as Arbitrary>::Strategy
§impl Clone for ValidatorSet
impl Clone for ValidatorSet
§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 more§impl Debug for ValidatorSet
impl Debug for ValidatorSet
§impl<'de> Deserialize<'de> for ValidatorSet
impl<'de> Deserialize<'de> for ValidatorSet
§fn deserialize<__D>(
__deserializer: __D
) -> Result<ValidatorSet, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<ValidatorSet, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Display for ValidatorSet
impl Display for ValidatorSet
§impl From<&ValidatorSet> for ValidatorVerifier
impl From<&ValidatorSet> for ValidatorVerifier
§fn from(validator_set: &ValidatorSet) -> ValidatorVerifier
fn from(validator_set: &ValidatorSet) -> ValidatorVerifier
Converts to this type from the input type.
§impl From<&ValidatorVerifier> for ValidatorSet
impl From<&ValidatorVerifier> for ValidatorSet
§fn from(verifier: &ValidatorVerifier) -> ValidatorSet
fn from(verifier: &ValidatorVerifier) -> ValidatorSet
Converts to this type from the input type.
§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?
§fn into_iter(self) -> <ValidatorSet as IntoIterator>::IntoIter
fn into_iter(self) -> <ValidatorSet as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
§impl OnChainConfig for ValidatorSet
impl OnChainConfig for ValidatorSet
const IDENTIFIER: &'static str = "DiemSystem"
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 deserialize_into_config(bytes: &[u8]) -> Result<Self, Error>
fn fetch_config<T>(storage: &T) -> Option<Self>where T: ConfigStorage,
§impl PartialEq<ValidatorSet> for ValidatorSet
impl PartialEq<ValidatorSet> for ValidatorSet
§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 ==
.§impl Serialize for ValidatorSet
impl Serialize for ValidatorSet
§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 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> 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.