pub trait Permissions<AccountId> {
    type Scope;
    type Role;
    type Error: Debug;
    type Ok: Debug;

    // Required methods
    fn has(scope: Self::Scope, who: AccountId, role: Self::Role) -> bool;
    fn add(
        scope: Self::Scope,
        who: AccountId,
        role: Self::Role
    ) -> Result<Self::Ok, Self::Error>;
    fn remove(
        scope: Self::Scope,
        who: AccountId,
        role: Self::Role
    ) -> Result<Self::Ok, Self::Error>;
}

Required Associated Types§

Required Methods§

source

fn has(scope: Self::Scope, who: AccountId, role: Self::Role) -> bool

source

fn add( scope: Self::Scope, who: AccountId, role: Self::Role ) -> Result<Self::Ok, Self::Error>

source

fn remove( scope: Self::Scope, who: AccountId, role: Self::Role ) -> Result<Self::Ok, Self::Error>

Object Safety§

This trait is not object safe.

Implementors§