pub trait OnlyAdminModule: ContractBase + Sized {
// Required method
fn admins(&self) -> UnorderedSetMapper<Self::Api, ManagedAddress<Self::Api>>;
// Provided methods
fn is_admin(&self, address: ManagedAddress<Self::Api>) -> bool { ... }
fn add_admin(&self, address: ManagedAddress<Self::Api>) { ... }
fn remove_admin(&self, address: ManagedAddress<Self::Api>) { ... }
fn require_caller_is_admin(&self) { ... }
}
Required Methods§
fn admins(&self) -> UnorderedSetMapper<Self::Api, ManagedAddress<Self::Api>>
Provided Methods§
fn is_admin(&self, address: ManagedAddress<Self::Api>) -> bool
fn add_admin(&self, address: ManagedAddress<Self::Api>)
fn remove_admin(&self, address: ManagedAddress<Self::Api>)
fn require_caller_is_admin(&self)
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.