referrerpolicy=no-referrer-when-downgrade
pub fn voter_index_fn_owned<T: MinerConfig>(
    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.