Trait RankedMembers
pub trait RankedMembers {
    type AccountId;
    type Rank: AtLeast16BitUnsigned;
    // Required methods
    fn min_rank() -> Self::Rank;
    fn rank_of(who: &Self::AccountId) -> Option<Self::Rank>;
    fn induct(who: &Self::AccountId) -> Result<(), DispatchError>;
    fn promote(who: &Self::AccountId) -> Result<(), DispatchError>;
    fn demote(who: &Self::AccountId) -> Result<(), DispatchError>;
}Expand description
Ranked membership data structure.
Required Associated Types§
type AccountId
type Rank: AtLeast16BitUnsigned
Required Methods§
fn rank_of(who: &Self::AccountId) -> Option<Self::Rank>
fn rank_of(who: &Self::AccountId) -> Option<Self::Rank>
Return the rank of the given ID, or None if they are not a member.
fn induct(who: &Self::AccountId) -> Result<(), DispatchError>
fn induct(who: &Self::AccountId) -> Result<(), DispatchError>
Add a member to the group at the min_rank().
fn promote(who: &Self::AccountId) -> Result<(), DispatchError>
fn promote(who: &Self::AccountId) -> Result<(), DispatchError>
Promote a member to the next higher rank.
fn demote(who: &Self::AccountId) -> Result<(), DispatchError>
fn demote(who: &Self::AccountId) -> Result<(), DispatchError>
Demote a member to the next lower rank; demoting beyond the min_rank removes the
member entirely.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.