Trait frame_election_provider_support::ElectionProvider [−][src]
pub trait ElectionProvider<AccountId, BlockNumber> { type Error: Debug; type DataProvider: ElectionDataProvider<AccountId, BlockNumber>; fn elect() -> Result<(Supports<AccountId>, Weight), Self::Error>; }
Expand description
Something that can compute the result of an election and pass it back to the caller.
This trait only provides an interface to request an election, i.e.
ElectionProvider::elect
. That data required for the election need to be passed to the
implemented of this trait through ElectionProvider::DataProvider
.
Associated Types
type DataProvider: ElectionDataProvider<AccountId, BlockNumber>
type DataProvider: ElectionDataProvider<AccountId, BlockNumber>
The data provider of the election.
Required methods
Implementations on Foreign Types
Implementors
impl<T: Config> ElectionProvider<<T as Config>::AccountId, <T as Config>::BlockNumber> for OnChainSequentialPhragmen<T>