Struct pallet_membership::Module [−][src]
pub struct Module<T: Config<I>, I: Instance = DefaultInstance>(_);
Implementations
Can also be called using Call.
Add a member who to the set.
May only be called from T::AddOrigin.
NOTE: Calling this function will bypass origin filters.
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
pub fn swap_member(
origin: T::Origin,
remove: T::AccountId,
add: T::AccountId
) -> DispatchResultSwap 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.
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.
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.
Set the prime member. Must be a current member.
May only be called from T::PrimeOrigin.
NOTE: Calling this function will bypass origin filters.
Remove the prime member if it exists.
May only be called from T::PrimeOrigin.
NOTE: Calling this function will bypass origin filters.
Trait Implementations
Returns the current storage version as supported by the pallet.
Returns the on-chain storage version of the pallet as stored in the storage.
Run integrity test. Read more
impl<T: Config + Config<I>, I: Instance> OffchainWorker<<T as Config>::BlockNumber> for Module<T, I>
impl<T: Config + Config<I>, I: Instance> OffchainWorker<<T as Config>::BlockNumber> for Module<T, I>This function is being called after every block import (when fully synced). Read more
impl<T: Config + Config<I>, I: Instance> OnFinalize<<T as Config>::BlockNumber> for Module<T, I>
impl<T: Config + Config<I>, I: Instance> OnFinalize<<T as Config>::BlockNumber> for Module<T, I>The block is being finalized. Implement to have something happen. Read more
Something that should happen at genesis.
impl<T: Config + Config<I>, I: Instance> OnInitialize<<T as Config>::BlockNumber> for Module<T, I>
impl<T: Config + Config<I>, I: Instance> OnInitialize<<T as Config>::BlockNumber> for Module<T, I>The block is being initialized. Implement to have something happen. Read more
Get a vector of all members in the set, ordered.
Auto Trait Implementations
impl<T, I> RefUnwindSafe for Module<T, I> where
I: RefUnwindSafe,
T: RefUnwindSafe, impl<T, I> UnwindSafe for Module<T, I> where
I: UnwindSafe,
T: UnwindSafe, Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any, Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
Generate a storage key unique to this runtime upgrade. Read more
Get temporary storage data written by Self::set_temp_storage. Read more
Write some temporary data to a specific storage that can be read (potentially in
post-upgrade hook) via Self::get_temp_storage. Read more
impl<T> PalletVersionToStorageVersionHelper for T where
T: GetStorageVersion + PalletInfoAccess,
impl<T> PalletVersionToStorageVersionHelper for T where
T: GetStorageVersion + PalletInfoAccess, type Output = T
type Output = TShould always be Self
The inverse inclusion map: attempts to construct self from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> boolChecks if self is actually part of its subset T (and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SSUse with care! Same as self.to_subset but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SPThe inclusion map: converts self to the equivalent element of its superset.
The counterpart to unchecked_from.
Consume self to return an equivalent value of T.
pub fn vzip(self) -> Vimpl<T> MaybeDebug for T where
T: Debug, impl<T> MaybeDebug for T where
T: Debug,