Struct tendermint::validator::Set
source · [−]pub struct Set { /* private fields */ }Expand description
Validator set contains a vector of validators
Implementations
sourceimpl Set
impl Set
sourcepub fn without_proposer(validators: Vec<Info>) -> Set
pub fn without_proposer(validators: Vec<Info>) -> Set
Convenience constructor for cases where there is no proposer
sourcepub fn with_proposer(
validators: Vec<Info>,
proposer_address: Id
) -> Result<Self, Error>
pub fn with_proposer(
validators: Vec<Info>,
proposer_address: Id
) -> Result<Self, Error>
Convenience constructor for cases where there is a proposer
sourcepub fn validators(&self) -> &Vec<Info>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
pub fn validators(&self) -> &Vec<Info>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Get Info of the underlying validators.
sourcepub fn total_voting_power(&self) -> Power
pub fn total_voting_power(&self) -> Power
Get total voting power
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Set
impl<'de> Deserialize<'de> for Set
sourcefn 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
sourceimpl From<Set> for RawValidatorSet
impl From<Set> for RawValidatorSet
sourceimpl Protobuf<ValidatorSet> for Set
impl Protobuf<ValidatorSet> for Set
sourcefn encode<B>(&self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
fn encode<B>(&self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
Encode into a buffer in Protobuf format. Read more
sourcefn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
Encode with a length-delimiter to a buffer in Protobuf format. Read more
sourcefn decode<B>(buf: B) -> Result<Self, Error>where
B: Buf,
fn decode<B>(buf: B) -> Result<Self, Error>where
B: Buf,
Constructor that attempts to decode an instance from a buffer. Read more
sourcefn decode_length_delimited<B>(buf: B) -> Result<Self, Error>where
B: Buf,
fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>where
B: Buf,
Constructor that attempts to decode a length-delimited instance from
the buffer. Read more
sourcefn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter. Read more
sourcefn encode_vec(&self) -> Result<Vec<u8, Global>, Error>
fn encode_vec(&self) -> Result<Vec<u8, Global>, Error>
Encodes into a Protobuf-encoded
Vec<u8>.sourcefn decode_vec(v: &[u8]) -> Result<Self, Error>
fn decode_vec(v: &[u8]) -> Result<Self, Error>
Constructor that attempts to decode a Protobuf-encoded instance from a
Vec<u8> (or equivalent). Read moresourceimpl TryFrom<ValidatorSet> for Set
impl TryFrom<ValidatorSet> for Set
impl Eq for Set
impl StructuralEq for Set
impl StructuralPartialEq for Set
Auto Trait Implementations
impl RefUnwindSafe for Set
impl Send for Set
impl Sync for Set
impl Unpin for Set
impl UnwindSafe for Set
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more