Struct fuel_core_executor::refs::ContractRef
source · pub struct ContractRef<Database> { /* private fields */ }
Expand description
The wrapper around contract_id
to simplify work with Contract
in the database.
Implementations§
source§impl<Database> ContractRef<Database>
impl<Database> ContractRef<Database>
pub fn new(database: Database, contract_id: ContractId) -> Self
pub fn contract_id(&self) -> &ContractId
pub fn database(&self) -> &Database
pub fn database_mut(&mut self) -> &mut Database
source§impl<Database> ContractRef<Database>where
Database: StorageInspect<ContractsLatestUtxo>,
ExecutorError: From<Database::Error>,
impl<Database> ContractRef<Database>where Database: StorageInspect<ContractsLatestUtxo>, ExecutorError: From<Database::Error>,
source§impl<Database> ContractRef<Database>where
Database: StorageInspect<ContractsLatestUtxo>,
ExecutorError: From<Database::Error>,
impl<Database> ContractRef<Database>where Database: StorageInspect<ContractsLatestUtxo>, ExecutorError: From<Database::Error>,
pub fn validated_utxo( &self, utxo_validation: bool ) -> ExecutorResult<<ContractsLatestUtxo as Mappable>::OwnedValue>
source§impl<Database> ContractRef<Database>where
Database: MerkleRootStorage<ContractId, ContractsAssets>,
impl<Database> ContractRef<Database>where Database: MerkleRootStorage<ContractId, ContractsAssets>,
pub fn balance_root( &mut self ) -> Result<Bytes32, <Database as StorageInspect<ContractsAssets>>::Error>
source§impl<Database> ContractRef<Database>where
Database: MerkleRootStorage<ContractId, ContractsState>,
impl<Database> ContractRef<Database>where Database: MerkleRootStorage<ContractId, ContractsState>,
pub fn state_root( &mut self ) -> Result<Bytes32, <Database as StorageInspect<ContractsState>>::Error>
Trait Implementations§
source§impl<'a, Database> GenesisCommitment for ContractRef<&'a mut Database>where
Database: ContractStorageTrait,
impl<'a, Database> GenesisCommitment for ContractRef<&'a mut Database>where Database: ContractStorageTrait,
Auto Trait Implementations§
impl<Database> RefUnwindSafe for ContractRef<Database>where Database: RefUnwindSafe,
impl<Database> Send for ContractRef<Database>where Database: Send,
impl<Database> Sync for ContractRef<Database>where Database: Sync,
impl<Database> Unpin for ContractRef<Database>where Database: Unpin,
impl<Database> UnwindSafe for ContractRef<Database>where Database: UnwindSafe,
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