Struct fuel_vm::storage::ContractsRawCode
source · pub struct ContractsRawCode;
Expand description
The storage table for contract’s raw byte code.
Trait Implementations§
source§impl Mappable for ContractsRawCode
impl Mappable for ContractsRawCode
§type Key = <ContractsRawCode as Mappable>::OwnedKey
type Key = <ContractsRawCode as Mappable>::OwnedKey
The key type is used during interaction with the storage. In most cases, it is the same
as
Self::OwnedKey
.§type OwnedKey = ContractId
type OwnedKey = ContractId
The owned type of the
Key
retrieving from the storage.§type Value = [u8]
type Value = [u8]
The value type is used while setting the value to the storage. In most cases, it is the same
as
Self::OwnedValue
, but it is without restriction and can be used for performance
optimizations.§type OwnedValue = Contract
type OwnedValue = Contract
The owned type of the
Value
retrieving from the storage.source§impl StorageInspect<ContractsRawCode> for MemoryStorage
impl StorageInspect<ContractsRawCode> for MemoryStorage
type Error = Infallible
source§fn get(&self, key: &ContractId) -> Result<Option<Cow<'_, Contract>>, Infallible>
fn get(&self, key: &ContractId) -> Result<Option<Cow<'_, Contract>>, 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<ContractsRawCode> for MemoryStorage
impl StorageMutate<ContractsRawCode> for MemoryStorage
source§fn insert(
&mut self,
key: &ContractId,
value: &[u8]
) -> Result<Option<Contract>, Infallible>
fn insert( &mut self, key: &ContractId, value: &[u8] ) -> Result<Option<Contract>, Infallible>
Append
Key->Value
mapping to the storage. Read moresource§fn remove(&mut self, key: &ContractId) -> Result<Option<Contract>, Infallible>
fn remove(&mut self, key: &ContractId) -> Result<Option<Contract>, Infallible>
Remove
Key->Value
mapping from the storage. Read moreAuto Trait Implementations§
impl RefUnwindSafe for ContractsRawCode
impl Send for ContractsRawCode
impl Sync for ContractsRawCode
impl Unpin for ContractsRawCode
impl UnwindSafe for ContractsRawCode
Blanket Implementations§
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