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
sourceimpl 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.
sourceimpl StorageInspect<ContractsInfo> for MemoryStorage
impl StorageInspect<ContractsInfo> for MemoryStorage
type Error = Infallible
sourcefn 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
.
sourcefn 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.
sourceimpl StorageMutate<ContractsInfo> for MemoryStorage
impl StorageMutate<ContractsInfo> for MemoryStorage
sourcefn 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 more
sourcefn 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
Auto Trait Implementations
impl RefUnwindSafe for ContractsInfo
impl Send for ContractsInfo
impl Sync for ContractsInfo
impl Unpin for ContractsInfo
impl UnwindSafe for ContractsInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more