pub struct Support<AccountId> {
pub total: ExtendedBalance,
pub voters: Vec<(AccountId, ExtendedBalance)>,
}Expand description
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: ExtendedBalanceTotal support.
voters: Vec<(AccountId, ExtendedBalance)>Support from voters.
Trait Implementations§
Source§impl<'de, AccountId> Deserialize<'de> for Support<AccountId>where
AccountId: Deserialize<'de>,
impl<'de, AccountId> Deserialize<'de> for Support<AccountId>where
AccountId: Deserialize<'de>,
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
impl<AccountId: Eq> Eq for Support<AccountId>
impl<AccountId> StructuralPartialEq for Support<AccountId>
Auto Trait Implementations§
impl<AccountId> Freeze for Support<AccountId>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
Source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
Source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T. Read moreSource§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
Source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T.