Enum primitives::storage_key::StorageKey
source · pub enum StorageKey<'a> {
AccountKey(&'a [u8]),
StorageRootKey(&'a [u8]),
StorageKey {
address_bytes: &'a [u8],
storage_key: &'a [u8],
},
CodeRootKey(&'a [u8]),
CodeKey {
address_bytes: &'a [u8],
code_hash_bytes: &'a [u8],
},
DepositListKey(&'a [u8]),
VoteListKey(&'a [u8]),
}
Variants§
AccountKey(&'a [u8])
StorageRootKey(&'a [u8])
StorageKey
CodeRootKey(&'a [u8])
CodeKey
DepositListKey(&'a [u8])
VoteListKey(&'a [u8])
Implementations§
source§impl<'a> StorageKey<'a>
impl<'a> StorageKey<'a>
pub const fn with_space(self, space: Space) -> StorageKeyWithSpace<'a>
pub const fn with_native_space(self) -> StorageKeyWithSpace<'a>
pub const fn with_evm_space(self) -> StorageKeyWithSpace<'a>
pub const fn new_account_key(address: &'a Address) -> Self
pub const fn new_storage_root_key(address: &'a Address) -> Self
pub const fn new_storage_key( address: &'a Address, storage_key: &'a [u8] ) -> Self
pub fn new_code_root_key(address: &'a Address) -> Self
pub fn new_code_key(address: &'a Address, code_hash: &'a H256) -> Self
pub fn new_deposit_list_key(address: &'a Address) -> Self
pub fn new_vote_list_key(address: &'a Address) -> Self
source§impl<'a> StorageKey<'a>
impl<'a> StorageKey<'a>
pub fn to_key_bytes(&self) -> Vec<u8> ⓘ
Trait Implementations§
source§impl<'a> Clone for StorageKey<'a>
impl<'a> Clone for StorageKey<'a>
source§fn clone(&self) -> StorageKey<'a>
fn clone(&self) -> StorageKey<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for StorageKey<'a>
impl<'a> Debug for StorageKey<'a>
source§impl<'a> Hash for StorageKey<'a>
impl<'a> Hash for StorageKey<'a>
source§impl<'a> PartialEq for StorageKey<'a>
impl<'a> PartialEq for StorageKey<'a>
source§fn eq(&self, other: &StorageKey<'a>) -> bool
fn eq(&self, other: &StorageKey<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<'a> Copy for StorageKey<'a>
impl<'a> Eq for StorageKey<'a>
impl<'a> StructuralPartialEq for StorageKey<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for StorageKey<'a>
impl<'a> Send for StorageKey<'a>
impl<'a> Sync for StorageKey<'a>
impl<'a> Unpin for StorageKey<'a>
impl<'a> UnwindSafe for StorageKey<'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