Struct tendermint::validator::Set[][src]

pub struct Set { /* fields omitted */ }

Validator set contains a vector of validators

Implementations

impl Set[src]

pub fn new(validators: Vec<Info>, proposer: Option<Info>) -> Set[src]

Constructor

pub fn without_proposer(validators: Vec<Info>) -> Set[src]

Convenience constructor for cases where there is no proposer

pub fn with_proposer(
    validators: Vec<Info>,
    proposer_address: Id
) -> Result<Self, Error>
[src]

Convenience constructor for cases where there is a proposer

pub fn validators(&self) -> &Vec<Info>[src]

Get Info of the underlying validators.

pub fn proposer(&self) -> &Option<Info>[src]

Get proposer

pub fn total_voting_power(&self) -> Power[src]

Get total voting power

pub fn validator(&self, val_id: Id) -> Option<Info>[src]

Returns the validator with the given Id if its in the Set.

pub fn hash(&self) -> Hash[src]

Compute the hash of this validator set

Trait Implementations

impl Clone for Set[src]

impl Debug for Set[src]

impl<'de> Deserialize<'de> for Set[src]

impl PartialEq<Set> for Set[src]

impl Protobuf<ValidatorSet> for Set[src]

impl Serialize for Set[src]

impl StructuralPartialEq for Set[src]

impl TryFrom<ValidatorSet> for Set[src]

type Error = Error

The type returned in the event of a conversion error.

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,