Function pallet_election_provider_multi_phase::helpers::voter_index_fn_usize[][src]

pub fn voter_index_fn_usize<T: Config>(
    cache: &BTreeMap<T::AccountId, usize>
) -> impl Fn(&T::AccountId) -> Option<usize> + '_
Expand description

Same as voter_index_fn, but the returning index is converted into usize, if possible.

Warning

Note that this will represent the snapshot data from which the cache is generated.