Struct fuel_core_storage::ContractsStateKey
source · pub struct ContractsStateKey(_);
Expand description
The FuelVM storage double key.
Implementations§
source§impl ContractsStateKey
impl ContractsStateKey
sourcepub fn new(first: &ContractId, second: &Bytes32) -> ContractsStateKey
pub fn new(first: &ContractId, second: &Bytes32) -> ContractsStateKey
Create a new instance of the double storage key from references.
sourcepub fn from_array(array: [u8; 64]) -> ContractsStateKey
pub fn from_array(array: [u8; 64]) -> ContractsStateKey
Creates a new instance of double storage key from the array.
sourcepub fn from_slice(slice: &[u8]) -> Result<ContractsStateKey, TryFromSliceError>
pub fn from_slice(slice: &[u8]) -> Result<ContractsStateKey, 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 ContractsStateKey
impl AsRef<[u8]> for ContractsStateKey
source§impl Clone for ContractsStateKey
impl Clone for ContractsStateKey
source§fn clone(&self) -> ContractsStateKey
fn clone(&self) -> ContractsStateKey
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 ContractsStateKey
impl Debug for ContractsStateKey
source§impl Default for ContractsStateKey
impl Default for ContractsStateKey
source§fn default() -> ContractsStateKey
fn default() -> ContractsStateKey
Returns the “default value” for a type. Read more
source§impl From<(&ContractId, &Bytes32)> for ContractsStateKey
impl From<(&ContractId, &Bytes32)> for ContractsStateKey
source§fn from(pair: (&ContractId, &Bytes32)) -> ContractsStateKey
fn from(pair: (&ContractId, &Bytes32)) -> ContractsStateKey
Converts to this type from the input type.
source§impl Hash for ContractsStateKey
impl Hash for ContractsStateKey
source§impl Ord for ContractsStateKey
impl Ord for ContractsStateKey
source§fn cmp(&self, other: &ContractsStateKey) -> Ordering
fn cmp(&self, other: &ContractsStateKey) -> 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<ContractsStateKey> for ContractsStateKey
impl PartialEq<ContractsStateKey> for ContractsStateKey
source§fn eq(&self, other: &ContractsStateKey) -> bool
fn eq(&self, other: &ContractsStateKey) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<ContractsStateKey> for ContractsStateKey
impl PartialOrd<ContractsStateKey> for ContractsStateKey
source§fn partial_cmp(&self, other: &ContractsStateKey) -> Option<Ordering>
fn partial_cmp(&self, other: &ContractsStateKey) -> 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 ContractsStateKey
impl Eq for ContractsStateKey
impl StructuralEq for ContractsStateKey
impl StructuralPartialEq for ContractsStateKey
Auto Trait Implementations§
impl RefUnwindSafe for ContractsStateKey
impl Send for ContractsStateKey
impl Sync for ContractsStateKey
impl Unpin for ContractsStateKey
impl UnwindSafe for ContractsStateKey
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
)