Function pallet_election_provider_multi_phase::helpers::voter_index_fn_owned [−][src]
pub fn voter_index_fn_owned<T: Config>(
cache: BTreeMap<T::AccountId, usize>
) -> impl Fn(&T::AccountId) -> Option<SolutionVoterIndexOf<T>>
Expand description
Create a function that returns the index of a voter in the snapshot.
Same as voter_index_fn
but the returned function owns all its necessary data; nothing is
borrowed.