[][src]Trait frame_support::traits::ChangeMembers

pub trait ChangeMembers<AccountId: Clone + Ord> {
    pub fn change_members_sorted(
        incoming: &[AccountId],
        outgoing: &[AccountId],
        sorted_new: &[AccountId]
    ); pub fn change_members(
        incoming: &[AccountId],
        outgoing: &[AccountId],
        mut new: Vec<AccountId>
    ) { ... }
pub fn set_members_sorted(
        new_members: &[AccountId],
        old_members: &[AccountId]
    ) { ... }
pub fn compute_members_diff(
        new_members: &[AccountId],
        old_members: &[AccountId]
    ) -> (Vec<AccountId>, Vec<AccountId>) { ... }
pub fn set_prime(_prime: Option<AccountId>) { ... } }

Trait for type that can handle incremental changes to a set of account IDs.

Required methods

pub fn change_members_sorted(
    incoming: &[AccountId],
    outgoing: &[AccountId],
    sorted_new: &[AccountId]
)
[src]

A number of members _incoming just joined the set and replaced some _outgoing ones. The new set is thus given by sorted_new and must be sorted.

NOTE: This is the only function that needs to be implemented in ChangeMembers.

This resets any previous value of prime.

Loading content...

Provided methods

pub fn change_members(
    incoming: &[AccountId],
    outgoing: &[AccountId],
    mut new: Vec<AccountId>
)
[src]

A number of members incoming just joined the set and replaced some outgoing ones. The new set is given by new, and need not be sorted.

This resets any previous value of prime.

pub fn set_members_sorted(new_members: &[AccountId], old_members: &[AccountId])[src]

Set the new members; they must already be sorted. This will compute the diff and use it to call change_members_sorted.

This resets any previous value of prime.

pub fn compute_members_diff(
    new_members: &[AccountId],
    old_members: &[AccountId]
) -> (Vec<AccountId>, Vec<AccountId>)
[src]

Set the new members; they must already be sorted. This will compute the diff and use it to call change_members_sorted.

pub fn set_prime(_prime: Option<AccountId>)[src]

Set the prime member.

Loading content...

Implementations on Foreign Types

impl<T: Clone + Ord> ChangeMembers<T> for ()[src]

Loading content...

Implementors

Loading content...