[−][src]Struct casperlabs_engine_core::runtime::Runtime
Implementations
impl<'a, R> Runtime<'a, R> where
R: StateReader<Key, StoredValue>,
R::Error: Into<Error>, [src]
R: StateReader<Key, StoredValue>,
R::Error: Into<Error>,
pub fn new(
config: EngineConfig,
system_contract_cache: SystemContractCache,
memory: MemoryRef,
module: Module,
context: RuntimeContext<'a, R>
) -> Self[src]
config: EngineConfig,
system_contract_cache: SystemContractCache,
memory: MemoryRef,
module: Module,
context: RuntimeContext<'a, R>
) -> Self
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_proof_of_stake(&self, key: Key) -> bool[src]
pub fn call_host_mint(
&mut self,
protocol_version: ProtocolVersion,
named_keys: BTreeMap<String, Key>,
args: &[CLValue],
extra_urefs: &[Key]
) -> Result<CLValue, Error>[src]
&mut self,
protocol_version: ProtocolVersion,
named_keys: BTreeMap<String, Key>,
args: &[CLValue],
extra_urefs: &[Key]
) -> Result<CLValue, Error>
pub fn call_host_proof_of_stake(
&mut self,
protocol_version: ProtocolVersion,
named_keys: BTreeMap<String, Key>,
args: &[CLValue],
extra_urefs: &[Key]
) -> Result<CLValue, Error>[src]
&mut self,
protocol_version: ProtocolVersion,
named_keys: BTreeMap<String, Key>,
args: &[CLValue],
extra_urefs: &[Key]
) -> Result<CLValue, Error>
pub fn call_host_standard_payment(&mut self) -> Result<(), Error>[src]
pub fn call_contract(
&mut self,
key: Key,
args_bytes: Vec<u8>
) -> Result<CLValue, Error>[src]
&mut self,
key: Key,
args_bytes: Vec<u8>
) -> Result<CLValue, Error>
Calls contract living under a key, with supplied args.
pub fn add_local(
&mut self,
key_ptr: u32,
key_size: u32,
value_ptr: u32,
value_size: u32
) -> Result<(), Trap>[src]
&mut self,
key_ptr: u32,
key_size: u32,
value_ptr: u32,
value_size: u32
) -> Result<(), Trap>
Adds value to the cell pointed to by a key derived from key in the "local cluster" of
GlobalState
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]
R: StateReader<Key, StoredValue>,
R::Error: Into<Error>,
fn get_main_purse(&self) -> Result<URef, ApiError>[src]
impl<'a, R> Externals for Runtime<'a, R> where
R: StateReader<Key, StoredValue>,
R::Error: Into<Error>, [src]
R: StateReader<Key, StoredValue>,
R::Error: Into<Error>,
fn invoke_index(
&mut self,
index: usize,
args: RuntimeArgs
) -> Result<Option<RuntimeValue>, Trap>[src]
&mut self,
index: usize,
args: RuntimeArgs
) -> Result<Option<RuntimeValue>, Trap>
impl<'a, R> MintProvider for Runtime<'a, R> where
R: StateReader<Key, StoredValue>,
R::Error: Into<Error>, [src]
R: StateReader<Key, StoredValue>,
R::Error: Into<Error>,
fn transfer_purse_to_account(
&mut self,
source: URef,
target: PublicKey,
amount: U512
) -> Result<TransferredTo, ApiError>[src]
&mut self,
source: URef,
target: PublicKey,
amount: U512
) -> Result<TransferredTo, ApiError>
fn transfer_purse_to_purse(
&mut self,
source: URef,
target: URef,
amount: U512
) -> Result<(), ()>[src]
&mut self,
source: URef,
target: URef,
amount: U512
) -> Result<(), ()>
fn balance(&mut self, purse: URef) -> Option<U512>[src]
impl<'a, R> MintProvider for Runtime<'a, R> where
R: StateReader<Key, StoredValue>,
R::Error: Into<Error>, [src]
R: StateReader<Key, StoredValue>,
R::Error: Into<Error>,
fn transfer_purse_to_purse(
&mut self,
source: URef,
target: URef,
amount: U512
) -> Result<(), ApiError>[src]
&mut self,
source: URef,
target: URef,
amount: U512
) -> Result<(), ApiError>
impl<'a, R> ProofOfStake for Runtime<'a, R> where
R: StateReader<Key, StoredValue>,
R::Error: Into<Error>, [src]
R: StateReader<Key, StoredValue>,
R::Error: Into<Error>,
fn bond(
&mut self,
validator: PublicKey,
amount: U512,
source: URef
) -> Result<(), Error>[src]
&mut self,
validator: PublicKey,
amount: U512,
source: URef
) -> Result<(), Error>
fn unbond(
&mut self,
validator: PublicKey,
maybe_amount: Option<U512>
) -> Result<(), Error>[src]
&mut self,
validator: PublicKey,
maybe_amount: Option<U512>
) -> Result<(), Error>
fn get_payment_purse(&self) -> Result<URef, Error>[src]
fn set_refund_purse(&mut self, purse: URef) -> Result<(), Error>[src]
fn get_refund_purse(&self) -> Result<Option<URef>, Error>[src]
fn finalize_payment(
&mut self,
amount_spent: U512,
account: PublicKey
) -> Result<(), Error>[src]
&mut self,
amount_spent: U512,
account: PublicKey
) -> Result<(), Error>
impl<'a, R> ProofOfStakeProvider for Runtime<'a, R> where
R: StateReader<Key, StoredValue>,
R::Error: Into<Error>, [src]
R: StateReader<Key, StoredValue>,
R::Error: Into<Error>,
fn get_payment_purse(&mut self) -> Result<URef, ApiError>[src]
impl<'a, R> QueueProvider for Runtime<'a, R> where
R: StateReader<Key, StoredValue>,
R::Error: Into<Error>, [src]
R: StateReader<Key, StoredValue>,
R::Error: Into<Error>,
fn read_bonding(&mut self) -> Queue[src]
fn read_unbonding(&mut self) -> Queue[src]
fn write_bonding(&mut self, queue: Queue)[src]
fn write_unbonding(&mut self, queue: Queue)[src]
impl<'a, R> RuntimeProvider for Runtime<'a, R> where
R: StateReader<Key, StoredValue>,
R::Error: Into<Error>, [src]
R: StateReader<Key, StoredValue>,
R::Error: Into<Error>,
fn get_key(&self, name: &str) -> Option<Key>[src]
fn put_key(&mut self, name: &str, key: Key)[src]
fn remove_key(&mut self, name: &str)[src]
fn get_phase(&self) -> Phase[src]
fn get_block_time(&self) -> BlockTime[src]
fn get_caller(&self) -> PublicKey[src]
impl<'a, R> StakesProvider for Runtime<'a, R> where
R: StateReader<Key, StoredValue>,
R::Error: Into<Error>, [src]
R: StateReader<Key, StoredValue>,
R::Error: Into<Error>,
impl<'a, R> StandardPayment for Runtime<'a, R> where
R: StateReader<Key, StoredValue>,
R::Error: Into<Error>, [src]
R: StateReader<Key, StoredValue>,
R::Error: Into<Error>,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T> FromBits<T> for T
fn from_bits(other: T) -> T
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,