pub struct Whitelist {
pub whitelist: Mapping<Address, bool>,
}
Expand description
The Whitelist module.
Fields§
§whitelist: Mapping<Address, bool>
Implementations§
source§impl Whitelist
impl Whitelist
sourcepub fn add_to_whitelist(&mut self, address: Address)
pub fn add_to_whitelist(&mut self, address: Address)
Add new address
to the whitelist.
sourcepub fn remove_from_whitelist(&mut self, address: Address)
pub fn remove_from_whitelist(&mut self, address: Address)
Remove an address
from the whitelist.
sourcepub fn ensure_whitelisted(&self)
pub fn ensure_whitelisted(&self)
Assert the caller is on the list. Revert otherwise.
sourcepub fn is_whitelisted(&self, address: Address) -> bool
pub fn is_whitelisted(&self, address: Address) -> bool
Returns true if the address is whitelisted.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Whitelist
impl Send for Whitelist
impl Sync for Whitelist
impl Unpin for Whitelist
impl UnwindSafe for Whitelist
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more