Struct pallet_evm::AccountStorages [−][src]
pub struct AccountStorages(_);
Trait Implementations
type Hasher1 = Blake2_128Concat
type Hasher1 = Blake2_128Concat
Hasher for the first key.
type Hasher2 = Blake2_128Concat
type Hasher2 = Blake2_128Concat
Hasher for the second 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
fn storage_double_map_final_key1<KArg1>(k1: KArg1) -> Vec<u8, Global> where
KArg1: EncodeLike<K1>,
fn storage_double_map_final_key1<KArg1>(k1: KArg1) -> Vec<u8, Global> where
KArg1: EncodeLike<K1>,
Generate the first part of the key used in top storage.
fn storage_double_map_final_key<KArg1, KArg2>(
k1: KArg1,
k2: KArg2
) -> Vec<u8, Global> where
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
fn storage_double_map_final_key<KArg1, KArg2>(
k1: KArg1,
k2: KArg2
) -> Vec<u8, Global> where
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
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 AccountStorages
impl Send for AccountStorages
impl Sync for AccountStorages
impl Unpin for AccountStorages
impl UnwindSafe for AccountStorages
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
impl<K1, K2, V, G> StorageDoubleMap<K1, K2, V> for G where
V: FullCodec,
K1: FullEncode,
K2: FullEncode,
G: StorageDoubleMap<K1, K2, V>,
impl<K1, K2, V, G> StorageDoubleMap<K1, K2, V> for G where
V: FullCodec,
K1: FullEncode,
K2: FullEncode,
G: StorageDoubleMap<K1, K2, V>,
type Query = <G as StorageDoubleMap<K1, K2, V>>::Query
type Query = <G as StorageDoubleMap<K1, K2, V>>::Query
The type that get/take returns.
pub fn hashed_key_for<KArg1, KArg2>(k1: KArg1, k2: KArg2) -> Vec<u8, Global> where
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
pub fn hashed_key_for<KArg1, KArg2>(k1: KArg1, k2: KArg2) -> Vec<u8, Global> where
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
Get the storage key used to fetch a value corresponding to a specific key.
pub fn contains_key<KArg1, KArg2>(k1: KArg1, k2: KArg2) -> bool where
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
pub fn contains_key<KArg1, KArg2>(k1: KArg1, k2: KArg2) -> bool where
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
Does the value (explicitly) exist in storage?
pub fn get<KArg1, KArg2>(
k1: KArg1,
k2: KArg2
) -> <G as StorageDoubleMap<K1, K2, V>>::Query where
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
pub fn get<KArg1, KArg2>(
k1: KArg1,
k2: KArg2
) -> <G as StorageDoubleMap<K1, K2, V>>::Query where
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
Load the value associated with the given key from the double map.
pub fn try_get<KArg1, KArg2>(k1: KArg1, k2: KArg2) -> Result<V, ()> where
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
pub fn try_get<KArg1, KArg2>(k1: KArg1, k2: KArg2) -> Result<V, ()> where
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
Try to get the value for the given key from the double map. Read more
pub fn take<KArg1, KArg2>(
k1: KArg1,
k2: KArg2
) -> <G as StorageDoubleMap<K1, K2, V>>::Query where
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
pub fn take<KArg1, KArg2>(
k1: KArg1,
k2: KArg2
) -> <G as StorageDoubleMap<K1, K2, V>>::Query where
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
Take a value from storage, removing it afterwards.
pub fn swap<XKArg1, XKArg2, YKArg1, YKArg2>(
x_k1: XKArg1,
x_k2: XKArg2,
y_k1: YKArg1,
y_k2: YKArg2
) where
XKArg1: EncodeLike<K1>,
XKArg2: EncodeLike<K2>,
YKArg1: EncodeLike<K1>,
YKArg2: EncodeLike<K2>,
pub fn swap<XKArg1, XKArg2, YKArg1, YKArg2>(
x_k1: XKArg1,
x_k2: XKArg2,
y_k1: YKArg1,
y_k2: YKArg2
) where
XKArg1: EncodeLike<K1>,
XKArg2: EncodeLike<K2>,
YKArg1: EncodeLike<K1>,
YKArg2: EncodeLike<K2>,
Swap the values of two key-pairs.
pub fn insert<KArg1, KArg2, VArg>(k1: KArg1, k2: KArg2, val: VArg) where
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
VArg: EncodeLike<V>,
pub fn insert<KArg1, KArg2, VArg>(k1: KArg1, k2: KArg2, val: VArg) where
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
VArg: EncodeLike<V>,
Store a value to be associated with the given keys from the double map.
pub fn remove<KArg1, KArg2>(k1: KArg1, k2: KArg2) where
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
pub fn remove<KArg1, KArg2>(k1: KArg1, k2: KArg2) where
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
Remove the value under the given keys.
Remove all values under the first key.
pub fn iter_prefix_values<KArg1>(k1: KArg1) -> PrefixIterator<V> where
KArg1: EncodeLike<K1> + ?Sized,
pub fn iter_prefix_values<KArg1>(k1: KArg1) -> PrefixIterator<V> where
KArg1: EncodeLike<K1> + ?Sized,
Iterate over values that share the first key.
pub fn mutate<KArg1, KArg2, R, F>(k1: KArg1, k2: KArg2, f: F) -> R where
F: FnOnce(&mut <G as StorageDoubleMap<K1, K2, V>>::Query) -> R,
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
pub fn mutate<KArg1, KArg2, R, F>(k1: KArg1, k2: KArg2, f: F) -> R where
F: FnOnce(&mut <G as StorageDoubleMap<K1, K2, V>>::Query) -> R,
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
Mutate the value under the given keys.
pub fn mutate_exists<KArg1, KArg2, R, F>(k1: KArg1, k2: KArg2, f: F) -> R where
F: FnOnce(&mut Option<V>) -> R,
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
pub fn mutate_exists<KArg1, KArg2, R, F>(k1: KArg1, k2: KArg2, f: F) -> R where
F: FnOnce(&mut Option<V>) -> R,
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
Mutate the value under the given keys. Deletes the item if mutated to a None
.
pub fn try_mutate<KArg1, KArg2, R, E, F>(
k1: KArg1,
k2: KArg2,
f: F
) -> Result<R, E> where
F: FnOnce(&mut <G as StorageDoubleMap<K1, K2, V>>::Query) -> Result<R, E>,
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
pub fn try_mutate<KArg1, KArg2, R, E, F>(
k1: KArg1,
k2: KArg2,
f: F
) -> Result<R, E> where
F: FnOnce(&mut <G as StorageDoubleMap<K1, K2, V>>::Query) -> Result<R, E>,
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
Mutate the value under the given keys when the closure returns Ok
.
pub fn try_mutate_exists<KArg1, KArg2, R, E, F>(
k1: KArg1,
k2: KArg2,
f: F
) -> Result<R, E> where
F: FnOnce(&mut Option<V>) -> Result<R, E>,
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
pub fn try_mutate_exists<KArg1, KArg2, R, E, F>(
k1: KArg1,
k2: KArg2,
f: F
) -> Result<R, E> where
F: FnOnce(&mut Option<V>) -> Result<R, E>,
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
Mutate the item, only if an Ok
value is returned. Deletes the item if mutated to a None
.
pub fn append<Item, EncodeLikeItem, KArg1, KArg2>(
k1: KArg1,
k2: KArg2,
item: EncodeLikeItem
) where
Item: Encode,
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
V: StorageAppend<Item>,
EncodeLikeItem: EncodeLike<Item>,
pub fn append<Item, EncodeLikeItem, KArg1, KArg2>(
k1: KArg1,
k2: KArg2,
item: EncodeLikeItem
) where
Item: Encode,
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
V: StorageAppend<Item>,
EncodeLikeItem: EncodeLike<Item>,
Append the given item to the value in the storage. Read more
pub fn migrate_keys<OldHasher1, OldHasher2, KeyArg1, KeyArg2>(
key1: KeyArg1,
key2: KeyArg2
) -> Option<V> where
OldHasher1: StorageHasher,
OldHasher2: StorageHasher,
KeyArg1: EncodeLike<K1>,
KeyArg2: EncodeLike<K2>,
pub fn migrate_keys<OldHasher1, OldHasher2, KeyArg1, KeyArg2>(
key1: KeyArg1,
key2: KeyArg2
) -> Option<V> where
OldHasher1: StorageHasher,
OldHasher2: StorageHasher,
KeyArg1: EncodeLike<K1>,
KeyArg2: EncodeLike<K2>,
Migrate an item with the given key1
and key2
from defunct OldHasher1
and
OldHasher2
to the current hashers. Read more
fn decode_len<KArg1, KArg2>(key1: KArg1, key2: KArg2) -> Option<usize> where
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
V: StorageDecodeLength,
fn decode_len<KArg1, KArg2>(key1: KArg1, key2: KArg2) -> Option<usize> where
KArg1: EncodeLike<K1>,
KArg2: EncodeLike<K2>,
V: StorageDecodeLength,
Read the length of the storage value without decoding the entire value under the
given key1
and key2
. 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
.