pub struct WhitelistMapper<SA, T, A = CurrentStorage>where
SA: StorageMapperApi,
A: StorageAddress<SA>,
T: NestedEncode + 'static,{ /* private fields */ }
Expand description
A non-iterable whitelist mapper. Very efficient for storing a whitelist, as each item requires only one storage key. If you need to iterate over the keys, use UnorderedSetMapper or SetMapper instead.
Implementations§
Source§impl<SA, T> WhitelistMapper<SA, T, ManagedAddress<SA>>
impl<SA, T> WhitelistMapper<SA, T, ManagedAddress<SA>>
Source§impl<SA, T> WhitelistMapper<SA, T, CurrentStorage>
impl<SA, T> WhitelistMapper<SA, T, CurrentStorage>
Trait Implementations§
Source§impl<SA, T> StorageMapper<SA> for WhitelistMapper<SA, T, CurrentStorage>where
SA: StorageMapperApi,
T: NestedEncode + 'static,
impl<SA, T> StorageMapper<SA> for WhitelistMapper<SA, T, CurrentStorage>where
SA: StorageMapperApi,
T: NestedEncode + 'static,
Source§fn new(base_key: StorageKey<SA>) -> Self
fn new(base_key: StorageKey<SA>) -> Self
Will be called automatically by the
#[storage_mapper]
annotation generated code.Source§impl<SA, T> StorageMapperFromAddress<SA> for WhitelistMapper<SA, T, ManagedAddress<SA>>where
SA: StorageMapperApi,
T: NestedEncode + 'static,
impl<SA, T> StorageMapperFromAddress<SA> for WhitelistMapper<SA, T, ManagedAddress<SA>>where
SA: StorageMapperApi,
T: NestedEncode + 'static,
Source§fn new_from_address(
address: ManagedAddress<SA>,
base_key: StorageKey<SA>,
) -> Self
fn new_from_address( address: ManagedAddress<SA>, base_key: StorageKey<SA>, ) -> Self
Will be called automatically by the
#[storage_mapper_from_address]
annotation generated code.Auto Trait Implementations§
impl<SA, T, A> Freeze for WhitelistMapper<SA, T, A>
impl<SA, T, A> RefUnwindSafe for WhitelistMapper<SA, T, A>where
A: RefUnwindSafe,
T: RefUnwindSafe,
<SA as HandleTypeInfo>::ManagedBufferHandle: RefUnwindSafe,
impl<SA, T, A> Send for WhitelistMapper<SA, T, A>
impl<SA, T, A> Sync for WhitelistMapper<SA, T, A>
impl<SA, T, A> Unpin for WhitelistMapper<SA, T, A>
impl<SA, T, A> UnwindSafe for WhitelistMapper<SA, T, A>
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