[−][src]Struct sp_npos_elections::Support
A structure to demonstrate the election result from the perspective of the candidate, i.e. how much support each candidate is receiving.
This complements the ElectionResult
and is needed to run the balancing 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]
AccountId: Deserialize<'de>,
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<AccountId: Eq> Eq for Support<AccountId>
[src]
impl<AccountId: PartialEq> PartialEq<Support<AccountId>> for Support<AccountId>
[src]
pub fn eq(&self, other: &Support<AccountId>) -> bool
[src]
pub fn ne(&self, other: &Support<AccountId>) -> bool
[src]
impl<AccountId> Serialize for Support<AccountId> where
AccountId: Serialize,
[src]
AccountId: Serialize,
pub fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
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,
[src]
AccountId: RefUnwindSafe,
impl<AccountId> Send for Support<AccountId> where
AccountId: Send,
[src]
AccountId: Send,
impl<AccountId> Sync for Support<AccountId> where
AccountId: Sync,
[src]
AccountId: Sync,
impl<AccountId> Unpin for Support<AccountId> where
AccountId: Unpin,
[src]
AccountId: Unpin,
impl<AccountId> UnwindSafe for Support<AccountId> where
AccountId: UnwindSafe,
[src]
AccountId: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SaturatedConversion for T
[src]
pub fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
[src]
Self: UniqueSaturatedFrom<T>,
pub fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
[src]
Self: UniqueSaturatedInto<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
[src]
T: Bounded,
S: TryInto<T>,