pub trait BaseRuntime {
    type Read: Debug + Send;
    type ContainsKey: Debug + Send;
    type ReadMultiValuesBytes: Debug + Send;
    type ReadValueBytes: Debug + Send;
    type FindKeysByPrefix: Debug + Send;
    type FindKeyValuesByPrefix: Debug + Send;

Show 16 methods // Required methods fn chain_id(&mut self) -> Result<ChainId, ExecutionError>; fn application_id(&mut self) -> Result<UserApplicationId, ExecutionError>; fn application_parameters(&mut self) -> Result<Vec<u8>, ExecutionError>; fn read_system_balance(&mut self) -> Result<Amount, ExecutionError>; fn read_system_timestamp(&mut self) -> Result<Timestamp, ExecutionError>; fn contains_key_new( &mut self, key: Vec<u8> ) -> Result<Self::ContainsKey, ExecutionError>; fn contains_key_wait( &mut self, promise: &Self::ContainsKey ) -> Result<bool, ExecutionError>; fn read_multi_values_bytes_new( &mut self, keys: Vec<Vec<u8>> ) -> Result<Self::ReadMultiValuesBytes, ExecutionError>; fn read_multi_values_bytes_wait( &mut self, promise: &Self::ReadMultiValuesBytes ) -> Result<Vec<Option<Vec<u8>>>, ExecutionError>; fn write_batch(&mut self, batch: Batch) -> Result<(), ExecutionError>; fn read_value_bytes_new( &mut self, key: Vec<u8> ) -> Result<Self::ReadValueBytes, ExecutionError>; fn read_value_bytes_wait( &mut self, promise: &Self::ReadValueBytes ) -> Result<Option<Vec<u8>>, ExecutionError>; fn find_keys_by_prefix_new( &mut self, key_prefix: Vec<u8> ) -> Result<Self::FindKeysByPrefix, ExecutionError>; fn find_keys_by_prefix_wait( &mut self, promise: &Self::FindKeysByPrefix ) -> Result<Vec<Vec<u8>>, ExecutionError>; fn find_key_values_by_prefix_new( &mut self, key_prefix: Vec<u8> ) -> Result<Self::FindKeyValuesByPrefix, ExecutionError>; fn find_key_values_by_prefix_wait( &mut self, promise: &Self::FindKeyValuesByPrefix ) -> Result<Vec<(Vec<u8>, Vec<u8>)>, ExecutionError>;
}

Required Associated Types§

Required Methods§

source

fn chain_id(&mut self) -> Result<ChainId, ExecutionError>

The current chain id.

source

fn application_id(&mut self) -> Result<UserApplicationId, ExecutionError>

The current application id.

source

fn application_parameters(&mut self) -> Result<Vec<u8>, ExecutionError>

The current application parameters.

source

fn read_system_balance(&mut self) -> Result<Amount, ExecutionError>

Reads the system balance.

source

fn read_system_timestamp(&mut self) -> Result<Timestamp, ExecutionError>

Reads the system timestamp.

source

fn contains_key_new( &mut self, key: Vec<u8> ) -> Result<Self::ContainsKey, ExecutionError>

Tests whether a key exists in the key-value store (new)

source

fn contains_key_wait( &mut self, promise: &Self::ContainsKey ) -> Result<bool, ExecutionError>

Tests whether a key exists in the key-value store (wait)

source

fn read_multi_values_bytes_new( &mut self, keys: Vec<Vec<u8>> ) -> Result<Self::ReadMultiValuesBytes, ExecutionError>

Reads several keys from the key-value store (new)

source

fn read_multi_values_bytes_wait( &mut self, promise: &Self::ReadMultiValuesBytes ) -> Result<Vec<Option<Vec<u8>>>, ExecutionError>

Reads several keys from the key-value store (wait)

source

fn write_batch(&mut self, batch: Batch) -> Result<(), ExecutionError>

Writes a batch of changes.

Hack: This fails for services.

source

fn read_value_bytes_new( &mut self, key: Vec<u8> ) -> Result<Self::ReadValueBytes, ExecutionError>

Reads the key from the key-value store (new)

source

fn read_value_bytes_wait( &mut self, promise: &Self::ReadValueBytes ) -> Result<Option<Vec<u8>>, ExecutionError>

Reads the key from the key-value store (wait)

source

fn find_keys_by_prefix_new( &mut self, key_prefix: Vec<u8> ) -> Result<Self::FindKeysByPrefix, ExecutionError>

Reads the data from the keys having a specific prefix (new).

source

fn find_keys_by_prefix_wait( &mut self, promise: &Self::FindKeysByPrefix ) -> Result<Vec<Vec<u8>>, ExecutionError>

Reads the data from the keys having a specific prefix (wait).

source

fn find_key_values_by_prefix_new( &mut self, key_prefix: Vec<u8> ) -> Result<Self::FindKeyValuesByPrefix, ExecutionError>

Reads the data from the key/values having a specific prefix (new).

source

fn find_key_values_by_prefix_wait( &mut self, promise: &Self::FindKeyValuesByPrefix ) -> Result<Vec<(Vec<u8>, Vec<u8>)>, ExecutionError>

Reads the data from the key/values having a specific prefix (wait).

Implementors§