Struct casper_execution_engine::core::runtime::Runtime[][src]

pub struct Runtime<'a, R> { /* fields omitted */ }

Implementations

impl<'a, R> Runtime<'a, R> where
    R: StateReader<Key, StoredValue>,
    R::Error: Into<Error>, 
[src]

pub fn new(
    config: EngineConfig,
    system_contract_cache: SystemContractCache,
    memory: MemoryRef,
    module: Module,
    context: RuntimeContext<'a, R>
) -> Self
[src]

pub fn memory(&self) -> &MemoryRef[src]

pub fn module(&self) -> &Module[src]

pub fn context(&self) -> &RuntimeContext<'a, R>[src]

pub fn protocol_data(&self) -> &ProtocolData[src]

pub fn is_mint(&self, key: Key) -> bool[src]

pub fn is_handle_payment(&self, key: Key) -> bool[src]

pub fn is_auction(&self, key: Key) -> bool[src]

pub fn call_host_mint(
    &mut self,
    protocol_version: ProtocolVersion,
    entry_point_name: &str,
    named_keys: &mut NamedKeys,
    runtime_args: &RuntimeArgs,
    extra_keys: &[Key]
) -> Result<CLValue, Error>
[src]

pub fn call_host_handle_payment(
    &mut self,
    protocol_version: ProtocolVersion,
    entry_point_name: &str,
    named_keys: &mut NamedKeys,
    runtime_args: &RuntimeArgs,
    extra_keys: &[Key]
) -> Result<CLValue, Error>
[src]

pub fn call_host_standard_payment(&mut self) -> Result<(), Error>[src]

pub fn call_host_auction(
    &mut self,
    protocol_version: ProtocolVersion,
    entry_point_name: &str,
    named_keys: &mut NamedKeys,
    runtime_args: &RuntimeArgs,
    extra_keys: &[Key]
) -> Result<CLValue, Error>
[src]

pub fn call_contract(
    &mut self,
    contract_hash: ContractHash,
    entry_point_name: &str,
    args: RuntimeArgs
) -> Result<CLValue, Error>
[src]

Calls contract living under a key, with supplied args.

pub fn call_versioned_contract(
    &mut self,
    contract_package_hash: ContractPackageHash,
    contract_version: Option<ContractVersion>,
    entry_point_name: String,
    args: RuntimeArgs
) -> Result<CLValue, Error>
[src]

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.

pub fn take_host_buffer(&mut self) -> Option<CLValue>[src]

If host_buffer set, clears the host_buffer and returns value, else None

Trait Implementations

impl<'a, R> AccountProvider for Runtime<'a, R> where
    R: StateReader<Key, StoredValue>,
    R::Error: Into<Error>, 
[src]

impl<'a, R> AccountProvider for Runtime<'a, R> where
    R: StateReader<Key, StoredValue>,
    R::Error: Into<Error>, 
[src]

impl<'a, R> Auction for Runtime<'a, R> where
    R: StateReader<Key, StoredValue>,
    R::Error: Into<Error>, 
[src]

impl<'a, R> Externals for Runtime<'a, R> where
    R: StateReader<Key, StoredValue>,
    R::Error: Into<Error>, 
[src]

impl<'a, R> HandlePayment for Runtime<'a, R> where
    R: StateReader<Key, StoredValue>,
    R::Error: Into<Error>, 
[src]

impl<'a, R> HandlePaymentProvider for Runtime<'a, R> where
    R: StateReader<Key, StoredValue>,
    R::Error: Into<Error>, 
[src]

impl<'a, R> Mint for Runtime<'a, R> where
    R: StateReader<Key, StoredValue>,
    R::Error: Into<Error>, 
[src]

impl<'a, R> MintProvider for Runtime<'a, R> where
    R: StateReader<Key, StoredValue>,
    R::Error: Into<Error>, 
[src]

impl<'a, R> MintProvider for Runtime<'a, R> where
    R: StateReader<Key, StoredValue>,
    R::Error: Into<Error>, 
[src]

impl<'a, R> MintProvider for Runtime<'a, R> where
    R: StateReader<Key, StoredValue>,
    R::Error: Into<Error>, 
[src]

impl<'a, R> RuntimeProvider for Runtime<'a, R> where
    R: StateReader<Key, StoredValue>,
    R::Error: Into<Error>, 
[src]

impl<'a, R> RuntimeProvider for Runtime<'a, R> where
    R: StateReader<Key, StoredValue>,
    R::Error: Into<Error>, 
[src]

impl<'a, R> RuntimeProvider for Runtime<'a, R> where
    R: StateReader<Key, StoredValue>,
    R::Error: Into<Error>, 
[src]

impl<'a, R> StandardPayment for Runtime<'a, R> where
    R: StateReader<Key, StoredValue>,
    R::Error: Into<Error>, 
[src]

impl<'a, R> StorageProvider for Runtime<'a, R> where
    R: StateReader<Key, StoredValue>,
    R::Error: Into<Error>, 
[src]

impl<'a, R> StorageProvider for Runtime<'a, R> where
    R: StateReader<Key, StoredValue>,
    R::Error: Into<Error>, 
[src]

impl<'a, R> SystemProvider for Runtime<'a, R> where
    R: StateReader<Key, StoredValue>,
    R::Error: Into<Error>, 
[src]

impl<'a, R> SystemProvider for Runtime<'a, R> where
    R: StateReader<Key, StoredValue>,
    R::Error: Into<Error>, 
[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Downcast for T where
    T: Any

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,