Struct fuel_vm::storage::ContractsAssetKey
source · pub struct ContractsAssetKey(_);
Expand description
The FuelVM storage double key.
Implementations§
source§impl ContractsAssetKey
impl ContractsAssetKey
sourcepub fn new(first: &ContractId, second: &AssetId) -> Self
pub fn new(first: &ContractId, second: &AssetId) -> Self
Create a new instance of the double storage key from references.
sourcepub fn from_array(array: [u8; 64]) -> Self
pub fn from_array(array: [u8; 64]) -> Self
Creates a new instance of double storage key from the array.
sourcepub fn from_slice(slice: &[u8]) -> Result<Self, TryFromSliceError>
pub fn from_slice(slice: &[u8]) -> Result<Self, TryFromSliceError>
Creates a new instance of double storage key from the slice.
sourcepub fn contract_id(&self) -> &ContractId
pub fn contract_id(&self) -> &ContractId
Returns the reference to the first sub-key.
Trait Implementations§
source§impl AsRef<[u8]> for ContractsAssetKey
impl AsRef<[u8]> for ContractsAssetKey
source§impl Clone for ContractsAssetKey
impl Clone for ContractsAssetKey
source§fn clone(&self) -> ContractsAssetKey
fn clone(&self) -> ContractsAssetKey
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 Debug for ContractsAssetKey
impl Debug for ContractsAssetKey
source§impl Default for ContractsAssetKey
impl Default for ContractsAssetKey
source§impl From<(&ContractId, &AssetId)> for ContractsAssetKey
impl From<(&ContractId, &AssetId)> for ContractsAssetKey
source§fn from(pair: (&ContractId, &AssetId)) -> Self
fn from(pair: (&ContractId, &AssetId)) -> Self
Converts to this type from the input type.
source§impl From<ContractsAssetKey> for (ContractId, AssetId)
impl From<ContractsAssetKey> for (ContractId, AssetId)
source§fn from(key: ContractsAssetKey) -> (ContractId, AssetId)
fn from(key: ContractsAssetKey) -> (ContractId, AssetId)
Converts to this type from the input type.
source§impl Hash for ContractsAssetKey
impl Hash for ContractsAssetKey
source§impl Ord for ContractsAssetKey
impl Ord for ContractsAssetKey
source§fn cmp(&self, other: &ContractsAssetKey) -> Ordering
fn cmp(&self, other: &ContractsAssetKey) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<ContractsAssetKey> for ContractsAssetKey
impl PartialEq<ContractsAssetKey> for ContractsAssetKey
source§fn eq(&self, other: &ContractsAssetKey) -> bool
fn eq(&self, other: &ContractsAssetKey) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<ContractsAssetKey> for ContractsAssetKey
impl PartialOrd<ContractsAssetKey> for ContractsAssetKey
source§fn partial_cmp(&self, other: &ContractsAssetKey) -> Option<Ordering>
fn partial_cmp(&self, other: &ContractsAssetKey) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for ContractsAssetKey
impl Eq for ContractsAssetKey
impl StructuralEq for ContractsAssetKey
impl StructuralPartialEq for ContractsAssetKey
Auto Trait Implementations§
impl RefUnwindSafe for ContractsAssetKey
impl Send for ContractsAssetKey
impl Sync for ContractsAssetKey
impl Unpin for ContractsAssetKey
impl UnwindSafe for ContractsAssetKey
Blanket Implementations§
source§impl<T> AnyDebug for Twhere
T: Any + Debug,
impl<T> AnyDebug for Twhere T: Any + Debug,
source§fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref(&self) -> &(dyn Any + 'static)
Returns a reference to the underlying type as
Any
.§impl<T> Base32Len for Twhere
T: AsRef<[u8]>,
impl<T> Base32Len for Twhere T: AsRef<[u8]>,
§fn base32_len(&self) -> usize
fn base32_len(&self) -> usize
Calculate the base32 serialized length
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<T> StorageAsMut for T
impl<T> StorageAsMut for T
fn storage<Type>(&mut self) -> StorageMut<'_, Self, Type>where Type: Mappable,
fn storage_as_mut<Type>(&mut self) -> StorageMut<'_, Self, Type>where Type: Mappable,
source§impl<T> StorageAsRef for T
impl<T> StorageAsRef for T
fn storage<Type>(&self) -> StorageRef<'_, Self, Type>where Type: Mappable,
fn storage_as_ref<Type>(&self) -> StorageRef<'_, Self, Type>where Type: Mappable,
source§impl<T> ToHex for Twhere
T: AsRef<[u8]>,
impl<T> ToHex for Twhere T: AsRef<[u8]>,
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)