Struct fuel_vm::storage::ContractsInfo
source · pub struct ContractsInfo;
Expand description
The storage table for contract’s additional information as salt, root hash, etc.
Trait Implementations§
source§impl Mappable for ContractsInfo
impl Mappable for ContractsInfo
§type SetValue = (Salt, Bytes32)
type SetValue = (Salt, Bytes32)
Salt
- is the salt used during creation of the contract for uniques.
Bytes32
- is the root hash of the contract’s code.
§type Key = ContractId
type Key = ContractId
The type of the value’s key.
§type GetValue = <ContractsInfo as Mappable>::SetValue
type GetValue = <ContractsInfo as Mappable>::SetValue
The value type is used while getting the value from the storage.
source§impl StorageInspect<ContractsInfo> for MemoryStorage
impl StorageInspect<ContractsInfo> for MemoryStorage
type Error = Infallible
source§fn get(
&self,
key: &ContractId
) -> Result<Option<Cow<'_, (Salt, Bytes32)>>, Infallible>
fn get(
&self,
key: &ContractId
) -> Result<Option<Cow<'_, (Salt, Bytes32)>>, Infallible>
Retrieve
Cow<Value>
such as Key->Value
.source§fn contains_key(&self, key: &ContractId) -> Result<bool, Infallible>
fn contains_key(&self, key: &ContractId) -> Result<bool, Infallible>
Return
true
if there is a Key
mapping to a value in the storage.source§impl StorageMutate<ContractsInfo> for MemoryStorage
impl StorageMutate<ContractsInfo> for MemoryStorage
source§fn insert(
&mut self,
key: &ContractId,
value: &(Salt, Bytes32)
) -> Result<Option<(Salt, Bytes32)>, Infallible>
fn insert(
&mut self,
key: &ContractId,
value: &(Salt, Bytes32)
) -> Result<Option<(Salt, Bytes32)>, Infallible>
Append
Key->Value
mapping to the storage. Read moresource§fn remove(
&mut self,
key: &ContractId
) -> Result<Option<(Salt, Bytes32)>, Infallible>
fn remove(
&mut self,
key: &ContractId
) -> Result<Option<(Salt, Bytes32)>, Infallible>
Remove
Key->Value
mapping from the storage. Read more