Struct pallet_membership::Module[][src]

pub struct Module<T: Config<I>, I: Instance = DefaultInstance>(_);

Implementations

impl<T: Config<I> + 'static, I: Instance> Module<T, I>[src]

pub fn members() -> Vec<T::AccountId>[src]

The current membership, stored as an ordered Vec.

pub fn prime() -> Option<T::AccountId>[src]

The current prime member, if one exists.

impl<T: Config<I>, I: Instance> Module<T, I>[src]

Can also be called using Call.

pub fn add_member(origin: T::Origin, who: T::AccountId) -> DispatchResult[src]

Add a member who to the set.

May only be called from T::AddOrigin.

NOTE: Calling this function will bypass origin filters.

pub fn remove_member(origin: T::Origin, who: T::AccountId) -> DispatchResult[src]

Remove a member who from the set.

May only be called from T::RemoveOrigin.

NOTE: Calling this function will bypass origin filters.

pub fn swap_member(
    origin: T::Origin,
    remove: T::AccountId,
    add: T::AccountId
) -> DispatchResult
[src]

Swap out one member remove for another add.

May only be called from T::SwapOrigin.

Prime membership is not passed from remove to add, if extant.

NOTE: Calling this function will bypass origin filters.

pub fn reset_members(
    origin: T::Origin,
    members: Vec<T::AccountId>
) -> DispatchResult
[src]

Change the membership to a new set, disregarding the existing membership. Be nice and pass members pre-sorted.

May only be called from T::ResetOrigin.

NOTE: Calling this function will bypass origin filters.

pub fn change_key(origin: T::Origin, new: T::AccountId) -> DispatchResult[src]

Swap out the sending member for some other key new.

May only be called from Signed origin of a current member.

Prime membership is passed from the origin account to new, if extant.

NOTE: Calling this function will bypass origin filters.

pub fn set_prime(origin: T::Origin, who: T::AccountId) -> DispatchResult[src]

Set the prime member. Must be a current member.

May only be called from T::PrimeOrigin.

NOTE: Calling this function will bypass origin filters.

pub fn clear_prime(origin: T::Origin) -> DispatchResult[src]

Remove the prime member if it exists.

May only be called from T::PrimeOrigin.

NOTE: Calling this function will bypass origin filters.

Trait Implementations

impl<T: Config<I>, I: Instance> Callable<T> for Module<T, I>[src]

type Call = Call<T, I>

impl<T: Clone + Config<I>, I: Clone + Instance> Clone for Module<T, I>[src]

impl<T: Config<I>, I: Instance> Contains<<T as Config>::AccountId> for Module<T, I>[src]

impl<T: Copy + Config<I>, I: Copy + Instance> Copy for Module<T, I>[src]

impl<T: Config<I>, I: Instance> Debug for Module<T, I> where
    T: Debug,
    I: Debug
[src]

impl<T: Eq + Config<I>, I: Eq + Instance> Eq for Module<T, I>[src]

impl<T: Config<I>, I: Instance> GetPalletVersion for Module<T, I>[src]

impl<T: Config<I>, I: Instance> IntegrityTest for Module<T, I>[src]

impl<T: Config<I>, I: Instance> ModuleErrorMetadata for Module<T, I>[src]

impl<T: Config + Config<I>, I: Instance> OffchainWorker<<T as Config>::BlockNumber> for Module<T, I>[src]

impl<T: Config + Config<I>, I: Instance> OnFinalize<<T as Config>::BlockNumber> for Module<T, I>[src]

impl<T: Config<I>, I: Instance> OnGenesis for Module<T, I>[src]

impl<T: Config + Config<I>, I: Instance> OnInitialize<<T as Config>::BlockNumber> for Module<T, I>[src]

impl<T: Config<I>, I: Instance> OnRuntimeUpgrade for Module<T, I>[src]

impl<T: PartialEq + Config<I>, I: PartialEq + Instance> PartialEq<Module<T, I>> for Module<T, I>[src]

impl<T: Config<I>, I: Instance> StructuralEq for Module<T, I>[src]

impl<T: Config<I>, I: Instance> StructuralPartialEq for Module<T, I>[src]

Auto Trait Implementations

impl<T, I> RefUnwindSafe for Module<T, I> where
    I: RefUnwindSafe,
    T: RefUnwindSafe
[src]

impl<T, I> Send for Module<T, I> where
    I: Send,
    T: Send
[src]

impl<T, I> Sync for Module<T, I> where
    I: Sync,
    T: Sync
[src]

impl<T, I> Unpin for Module<T, I> where
    I: Unpin,
    T: Unpin
[src]

impl<T, I> UnwindSafe for Module<T, I> where
    I: UnwindSafe,
    T: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CheckedConversion for T[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IsType<T> for T[src]

impl<T, Outer> IsWrappedBy<Outer> for T where
    T: From<Outer>,
    Outer: AsRef<T> + AsMut<T> + From<T>, 

pub fn from_ref(outer: &Outer) -> &T

Get a reference to the inner from the outer.

pub fn from_mut(outer: &mut Outer) -> &mut T

Get a mutable reference to the inner from the outer.

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe

impl<T> Member for T where
    T: 'static + Clone + PartialEq<T> + Eq + Send + Sync + Debug
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 

impl<T, S> UniqueSaturatedInto<T> for S where
    T: Bounded,
    S: TryInto<T>, 

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,