pub trait ScoreProvider<AccountId> {
type Score;
// Required method
fn score(who: &AccountId) -> Self::Score;
// Provided method
fn set_score_of(_: &AccountId, _: Self::Score) { ... }
}Expand description
Something that can provide the Score of an account. Similar to ElectionProvider and
ElectionDataProvider, this should typically be implementing by whoever is supposed to use
SortedListProvider.
Required Associated Types§
Required Methods§
sourcefn score(who: &AccountId) -> Self::Score
fn score(who: &AccountId) -> Self::Score
Get the current Score of who.
Provided Methods§
sourcefn set_score_of(_: &AccountId, _: Self::Score)
fn set_score_of(_: &AccountId, _: Self::Score)
For tests, benchmarks and fuzzing, set the score.