[][src]Struct sp_phragmen::Support

pub struct Support<AccountId> {
    pub total: ExtendedBalance,
    pub voters: Vec<(AccountId, ExtendedBalance)>,
}

A structure to demonstrate the phragmen result from the perspective of the candidate, i.e. how much support each candidate is receiving.

This complements the PhragmenResult and is needed to run the equalize post-processing.

This, at the current version, resembles the Exposure defined in the Staking pallet, yet they do not necessarily have to be the same.

Fields

total: ExtendedBalance

Total support.

voters: Vec<(AccountId, ExtendedBalance)>

Support from voters.

Trait Implementations

impl<AccountId: Debug> Debug for Support<AccountId>[src]

impl<AccountId: Default> Default for Support<AccountId>[src]

impl<'de, AccountId> Deserialize<'de> for Support<AccountId> where
    AccountId: Deserialize<'de>, 
[src]

impl<AccountId: Eq> Eq for Support<AccountId>[src]

impl<AccountId: PartialEq> PartialEq<Support<AccountId>> for Support<AccountId>[src]

impl<AccountId> Serialize for Support<AccountId> where
    AccountId: Serialize
[src]

impl<AccountId> StructuralEq for Support<AccountId>[src]

impl<AccountId> StructuralPartialEq for Support<AccountId>[src]

Auto Trait Implementations

impl<AccountId> RefUnwindSafe for Support<AccountId> where
    AccountId: RefUnwindSafe

impl<AccountId> Send for Support<AccountId> where
    AccountId: Send

impl<AccountId> Sync for Support<AccountId> where
    AccountId: Sync

impl<AccountId> Unpin for Support<AccountId> where
    AccountId: Unpin

impl<AccountId> UnwindSafe for Support<AccountId> where
    AccountId: UnwindSafe

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> SaturatedConversion for T[src]

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<T, S> UniqueSaturatedInto<T> for S where
    S: TryInto<T>,
    T: Bounded
[src]