Struct pallet_evm::AccountCodes [−][src]
pub struct AccountCodes(_);
Trait Implementations
type Hasher = Blake2_128Concat
type Hasher = Blake2_128Concat
Hasher. Used for generating final key.
Module prefix. Used for generating final key.
Storage prefix. Used for generating final key.
Convert an optional value retrieved from storage to the type queried.
Convert a query to an optional value into storage.
The full prefix; just the hash of module_prefix
concatenated to the hash of
storage_prefix
. Read more
Generate the full key used in top storage.
Module prefix. Used for generating final key.
Storage prefix. Used for generating final key.
Final full prefix that prefixes all keys.
Remove all value of the storage.
Iter over all value of the storage. Read more
Auto Trait Implementations
impl RefUnwindSafe for AccountCodes
impl Send for AccountCodes
impl Sync for AccountCodes
impl Unpin for AccountCodes
impl UnwindSafe for AccountCodes
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
Convert from a value of T
into an equivalent instance of Self
. Read more
fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of T
. Read more
type Query = <G as StorageMap<K, V>>::Query
type Query = <G as StorageMap<K, V>>::Query
The type that get/take return.
Get the storage key used to fetch a value corresponding to a specific key.
pub fn swap<KeyArg1, KeyArg2>(key1: KeyArg1, key2: KeyArg2) where
KeyArg1: EncodeLike<K>,
KeyArg2: EncodeLike<K>,
pub fn swap<KeyArg1, KeyArg2>(key1: KeyArg1, key2: KeyArg2) where
KeyArg1: EncodeLike<K>,
KeyArg2: EncodeLike<K>,
Swap the values of two keys.
Does the value (explicitly) exist in storage?
Load the value associated with the given key from the map.
Try to get the value for the given key from the map. Read more
pub fn insert<KeyArg, ValArg>(key: KeyArg, val: ValArg) where
KeyArg: EncodeLike<K>,
ValArg: EncodeLike<V>,
pub fn insert<KeyArg, ValArg>(key: KeyArg, val: ValArg) where
KeyArg: EncodeLike<K>,
ValArg: EncodeLike<V>,
Store a value to be associated with the given key from the map.
Remove the value under a key.
pub fn mutate<KeyArg, R, F>(key: KeyArg, f: F) -> R where
F: FnOnce(&mut <G as StorageMap<K, V>>::Query) -> R,
KeyArg: EncodeLike<K>,
pub fn mutate<KeyArg, R, F>(key: KeyArg, f: F) -> R where
F: FnOnce(&mut <G as StorageMap<K, V>>::Query) -> R,
KeyArg: EncodeLike<K>,
Mutate the value under a key.
pub fn mutate_exists<KeyArg, R, F>(key: KeyArg, f: F) -> R where
F: FnOnce(&mut Option<V>) -> R,
KeyArg: EncodeLike<K>,
pub fn mutate_exists<KeyArg, R, F>(key: KeyArg, f: F) -> R where
F: FnOnce(&mut Option<V>) -> R,
KeyArg: EncodeLike<K>,
Mutate the value under a key. Read more
pub fn try_mutate<KeyArg, R, E, F>(key: KeyArg, f: F) -> Result<R, E> where
F: FnOnce(&mut <G as StorageMap<K, V>>::Query) -> Result<R, E>,
KeyArg: EncodeLike<K>,
pub fn try_mutate<KeyArg, R, E, F>(key: KeyArg, f: F) -> Result<R, E> where
F: FnOnce(&mut <G as StorageMap<K, V>>::Query) -> Result<R, E>,
KeyArg: EncodeLike<K>,
Mutate the item, only if an Ok
value is returned.
pub fn try_mutate_exists<KeyArg, R, E, F>(key: KeyArg, f: F) -> Result<R, E> where
F: FnOnce(&mut Option<V>) -> Result<R, E>,
KeyArg: EncodeLike<K>,
pub fn try_mutate_exists<KeyArg, R, E, F>(key: KeyArg, f: F) -> Result<R, E> where
F: FnOnce(&mut Option<V>) -> Result<R, E>,
KeyArg: EncodeLike<K>,
Mutate the item, only if an Ok
value is returned. Deletes the item if mutated to a None
.
pub fn take<KeyArg>(key: KeyArg) -> <G as StorageMap<K, V>>::Query where
KeyArg: EncodeLike<K>,
pub fn take<KeyArg>(key: KeyArg) -> <G as StorageMap<K, V>>::Query where
KeyArg: EncodeLike<K>,
Take the value under a key.
pub fn append<Item, EncodeLikeItem, EncodeLikeKey>(
key: EncodeLikeKey,
item: EncodeLikeItem
) where
Item: Encode,
V: StorageAppend<Item>,
EncodeLikeItem: EncodeLike<Item>,
EncodeLikeKey: EncodeLike<K>,
pub fn append<Item, EncodeLikeItem, EncodeLikeKey>(
key: EncodeLikeKey,
item: EncodeLikeItem
) where
Item: Encode,
V: StorageAppend<Item>,
EncodeLikeItem: EncodeLike<Item>,
EncodeLikeKey: EncodeLike<K>,
Append the given items to the value in the storage. Read more
pub fn migrate_key<OldHasher, KeyArg>(key: KeyArg) -> Option<V> where
KeyArg: EncodeLike<K>,
OldHasher: StorageHasher,
pub fn migrate_key<OldHasher, KeyArg>(key: KeyArg) -> Option<V> where
KeyArg: EncodeLike<K>,
OldHasher: StorageHasher,
Migrate an item with the given key
from a defunct OldHasher
to the current hasher. Read more
fn decode_len<KeyArg>(key: KeyArg) -> Option<usize> where
V: StorageDecodeLength,
KeyArg: EncodeLike<K>,
fn decode_len<KeyArg>(key: KeyArg) -> Option<usize> where
V: StorageDecodeLength,
KeyArg: EncodeLike<K>,
Read the length of the storage value without decoding the entire value under the
given key
. Read more
Migrate an item with the given key
from a blake2_256
hasher to the current hasher. Read more
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
The counterpart to unchecked_from
.
pub fn unique_saturated_into(self) -> T
pub fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of T
.