Struct fuel_core_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) -> ContractsAssetKey
pub fn new(first: &ContractId, second: &AssetId) -> ContractsAssetKey
Create a new instance of the double storage key from references.
sourcepub fn from_array(array: [u8; 64]) -> ContractsAssetKey
pub fn from_array(array: [u8; 64]) -> ContractsAssetKey
Creates a new instance of double storage key from the array.
sourcepub fn from_slice(slice: &[u8]) -> Result<ContractsAssetKey, TryFromSliceError>
pub fn from_slice(slice: &[u8]) -> Result<ContractsAssetKey, 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§fn default() -> ContractsAssetKey
fn default() -> ContractsAssetKey
Returns the “default value” for a type. Read more
source§impl From<(&ContractId, &AssetId)> for ContractsAssetKey
impl From<(&ContractId, &AssetId)> for ContractsAssetKey
source§fn from(pair: (&ContractId, &AssetId)) -> ContractsAssetKey
fn from(pair: (&ContractId, &AssetId)) -> ContractsAssetKey
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
§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,
§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
)