Struct casper_execution_engine::core::runtime::Runtime
source · pub struct Runtime<'a, R> { /* private fields */ }Expand description
Represents the runtime properties of a WASM execution.
Implementations§
source§impl<'a, R> Runtime<'a, R>
impl<'a, R> Runtime<'a, R>
sourcepub fn call_contract(
&mut self,
contract_hash: ContractHash,
entry_point_name: &str,
args: RuntimeArgs
) -> Result<CLValue, Error>
pub fn call_contract( &mut self, contract_hash: ContractHash, entry_point_name: &str, args: RuntimeArgs ) -> Result<CLValue, Error>
Calls contract living under a key, with supplied args.
sourcepub fn call_versioned_contract(
&mut self,
contract_package_hash: ContractPackageHash,
contract_version: Option<ContractVersion>,
entry_point_name: String,
args: RuntimeArgs
) -> Result<CLValue, Error>
pub fn call_versioned_contract( &mut self, contract_package_hash: ContractPackageHash, contract_version: Option<ContractVersion>, entry_point_name: String, args: RuntimeArgs ) -> Result<CLValue, Error>
Calls version of the contract living at key, invoking method with
supplied args. This function also checks the args conform with the
types given in the contract header.
sourcepub fn take_host_buffer(&mut self) -> Option<CLValue>
pub fn take_host_buffer(&mut self) -> Option<CLValue>
If host_buffer set, clears the host_buffer and returns value, else None
Trait Implementations§
Auto Trait Implementations§
impl<'a, R> !RefUnwindSafe for Runtime<'a, R>
impl<'a, R> !Send for Runtime<'a, R>
impl<'a, R> !Sync for Runtime<'a, R>
impl<'a, R> Unpin for Runtime<'a, R>
impl<'a, R> !UnwindSafe for Runtime<'a, R>
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.