pub enum ContractExecutableRef {
Wasm(Hash),
StellarAsset,
ExternalRef(ExternalExecutableRef),
}Expand description
A contract’s executable as recorded in its ContractInstance ledger entry.
Protocol 28 (CAP-0085) widened the ContractExecutable union beyond an
inline Wasm hash, so “the contract’s code” is no longer always a single
Hash. This mirrors the XDR union faithfully; callers that need the actual
code resolve the referenced entry through the RPC layer.
Variants§
Wasm(Hash)
CONTRACT_EXECUTABLE_WASM: the instance’s own Wasm hash.
StellarAsset
CONTRACT_EXECUTABLE_STELLAR_ASSET: a Stellar Asset Contract. This is
protocol-defined code with no Wasm artifact of its own — there is no hash
to report and nothing to download.
ExternalRef(ExternalExecutableRef)
CONTRACT_EXECUTABLE_EXTERNAL_REF (CAP-0085): the instance holds no
code; it references an entry owned by another contract.
Implementations§
Source§impl ContractExecutableRef
impl ContractExecutableRef
Sourcepub fn executable_tag_key(&self) -> Option<&ExternalExecutableRef>
pub fn executable_tag_key(&self) -> Option<&ExternalExecutableRef>
The ledger key of the owner’s executable entry, for resolution.
CAP-0085 keys this entry with SCV_EXECUTABLE_TAG and stores it as
Persistent contract data (the host rejects the Temporary and
Instance durabilities for such entries).
Trait Implementations§
Source§impl Clone for ContractExecutableRef
impl Clone for ContractExecutableRef
Source§impl Debug for ContractExecutableRef
impl Debug for ContractExecutableRef
impl Eq for ContractExecutableRef
Source§impl PartialEq for ContractExecutableRef
impl PartialEq for ContractExecutableRef
impl StructuralPartialEq for ContractExecutableRef
Auto Trait Implementations§
impl Freeze for ContractExecutableRef
impl RefUnwindSafe for ContractExecutableRef
impl Send for ContractExecutableRef
impl Sync for ContractExecutableRef
impl Unpin for ContractExecutableRef
impl UnsafeUnpin for ContractExecutableRef
impl UnwindSafe for ContractExecutableRef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.