pub struct SystemService<'a, Y>where
Y: SystemBasedKernelApi + ?Sized,{ /* private fields */ }
Expand description
A wrapper offering a comprehensive system api to callers. It is built on top
of a SystemBasedKernelApi
, and you are free to access it.
You can also construct a SystemService
from the api with api.system_service()
.
Like [SystemModuleApiImpl
], we use a wrapper type rather than implementing this functionality
directly on a SystemBasedKernelApi
for a few reasons:
- Trait coherence - the System traits aren’t defined in this crate, so it prevents us
from implementing them on any type implementing
SystemBasedKernelApi
. - Separation of APIs - we avoid exposing the methods of a [
SystemServiceApi
] directly if someone happens to have aSystemBasedKernelApi
, which prevents some possible confusion.
Implementations§
Source§impl<'a, Y> SystemService<'a, Y>where
Y: SystemBasedKernelApi + ?Sized,
impl<'a, Y> SystemService<'a, Y>where
Y: SystemBasedKernelApi + ?Sized,
pub fn new(api: &'a mut Y) -> SystemService<'a, Y>
pub fn api(&mut self) -> &mut Y
pub fn system( &mut self, ) -> &mut System<<Y as SystemBasedKernelApi>::SystemCallback>
Source§impl<'a, Y> SystemService<'a, Y>where
Y: SystemBasedKernelApi,
impl<'a, Y> SystemService<'a, Y>where
Y: SystemBasedKernelApi,
pub fn get_blueprint_default_definition( &mut self, blueprint_id: BlueprintId, ) -> Result<Rc<BlueprintDefinition>, RuntimeError>
pub fn load_blueprint_definition( &mut self, package_address: PackageAddress, bp_version_key: &BlueprintVersionKey, ) -> Result<Rc<BlueprintDefinition>, RuntimeError>
pub fn prepare_global_address( &mut self, blueprint_id: BlueprintId, global_address: GlobalAddress, ) -> Result<GlobalAddressReservation, RuntimeError>
pub fn get_node_type_info( &mut self, node_id: &NodeId, ) -> Result<TypeInfoSubstate, RuntimeError>
pub fn get_blueprint_info( &mut self, node_id: &NodeId, module_id: Option<AttachedModuleId>, ) -> Result<BlueprintInfo, RuntimeError>
pub fn get_actor_type_target( &mut self, ) -> Result<BlueprintTypeTarget, RuntimeError>
pub fn current_actor(&mut self) -> Actor
pub fn get_object_info( &mut self, node_id: &NodeId, ) -> Result<ObjectInfo, RuntimeError>
pub fn is_feature_enabled( &mut self, node_id: &NodeId, module_id: Option<AttachedModuleId>, feature: &str, ) -> Result<bool, RuntimeError>
Source§impl<'a, Y> SystemService<'a, Y>where
Y: SystemBasedKernelApi,
impl<'a, Y> SystemService<'a, Y>where
Y: SystemBasedKernelApi,
Sourcepub fn validate_bp_generic_args(
&mut self,
blueprint_interface: &BlueprintInterface,
schemas: &IndexMap<SchemaHash, VersionedSchema<ScryptoCustomSchema>>,
generic_substitutions: &Vec<GenericSubstitution>,
) -> Result<(), TypeCheckError>
pub fn validate_bp_generic_args( &mut self, blueprint_interface: &BlueprintInterface, schemas: &IndexMap<SchemaHash, VersionedSchema<ScryptoCustomSchema>>, generic_substitutions: &Vec<GenericSubstitution>, ) -> Result<(), TypeCheckError>
Validate that the type substitutions match the generic definition of a given blueprint
Sourcepub fn validate_kv_store_generic_args(
&mut self,
schemas: &IndexMap<SchemaHash, VersionedSchema<ScryptoCustomSchema>>,
key: &GenericSubstitution,
value: &GenericSubstitution,
) -> Result<(), TypeCheckError>
pub fn validate_kv_store_generic_args( &mut self, schemas: &IndexMap<SchemaHash, VersionedSchema<ScryptoCustomSchema>>, key: &GenericSubstitution, value: &GenericSubstitution, ) -> Result<(), TypeCheckError>
Validate that the type substitutions for a kv store exist in a given schema
pub fn get_payload_schema( &mut self, target: &BlueprintTypeTarget, payload_identifier: &BlueprintPayloadIdentifier, ) -> Result<(Rc<VersionedSchema<ScryptoCustomSchema>>, LocalTypeId, bool, bool, SchemaOrigin), RuntimeError>
Sourcepub fn validate_blueprint_payload(
&mut self,
target: &BlueprintTypeTarget,
payload_identifier: BlueprintPayloadIdentifier,
payload: &[u8],
) -> Result<(), RuntimeError>
pub fn validate_blueprint_payload( &mut self, target: &BlueprintTypeTarget, payload_identifier: BlueprintPayloadIdentifier, payload: &[u8], ) -> Result<(), RuntimeError>
Validate that a blueprint payload matches the blueprint’s definition of that payload
Sourcepub fn validate_blueprint_kv_collection(
&mut self,
target: &BlueprintTypeTarget,
collection_index: u8,
payloads: &[(&Vec<u8>, &Vec<u8>)],
) -> Result<PartitionDescription, RuntimeError>
pub fn validate_blueprint_kv_collection( &mut self, target: &BlueprintTypeTarget, collection_index: u8, payloads: &[(&Vec<u8>, &Vec<u8>)], ) -> Result<PartitionDescription, RuntimeError>
Validate that a blueprint kv collection payloads match the blueprint’s definition
Sourcepub fn validate_kv_store_payload(
&mut self,
target: &KVStoreTypeTarget,
payload_identifier: KeyOrValue,
payload: &[u8],
) -> Result<(), RuntimeError>
pub fn validate_kv_store_payload( &mut self, target: &KVStoreTypeTarget, payload_identifier: KeyOrValue, payload: &[u8], ) -> Result<(), RuntimeError>
Validate that a key value payload matches the key value store’s definition of that payload
pub fn get_blueprint_type_schema( &mut self, type_id: &BlueprintTypeIdentifier, ) -> Result<(Rc<VersionedSchema<ScryptoCustomSchema>>, ScopedTypeId), RuntimeError>
Trait Implementations§
Source§impl<'a, Y> KernelInternalApi for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
impl<'a, Y> KernelInternalApi for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
type System = <Y as KernelApi>::CallbackObject
Source§fn kernel_get_system_state(
&mut self,
) -> SystemState<'_, <Y as KernelApi>::CallbackObject>
fn kernel_get_system_state( &mut self, ) -> SystemState<'_, <Y as KernelApi>::CallbackObject>
Source§fn kernel_get_current_stack_depth_uncosted(&self) -> usize
fn kernel_get_current_stack_depth_uncosted(&self) -> usize
Source§fn kernel_get_current_stack_id_uncosted(&self) -> usize
fn kernel_get_current_stack_id_uncosted(&self) -> usize
Source§fn kernel_get_node_visibility_uncosted(
&self,
node_id: &NodeId,
) -> NodeVisibility
fn kernel_get_node_visibility_uncosted( &self, node_id: &NodeId, ) -> NodeVisibility
Source§fn kernel_read_substate_uncosted(
&self,
node_id: &NodeId,
partition_num: PartitionNumber,
substate_key: &SubstateKey,
) -> Option<&IndexedScryptoValue>
fn kernel_read_substate_uncosted( &self, node_id: &NodeId, partition_num: PartitionNumber, substate_key: &SubstateKey, ) -> Option<&IndexedScryptoValue>
Source§fn kernel_get_system(&mut self) -> &mut Self::System
fn kernel_get_system(&mut self) -> &mut Self::System
Source§impl<'a, Y> KernelNodeApi for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
impl<'a, Y> KernelNodeApi for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
Source§fn kernel_pin_node(&mut self, node_id: NodeId) -> Result<(), RuntimeError>
fn kernel_pin_node(&mut self, node_id: NodeId) -> Result<(), RuntimeError>
Source§fn kernel_drop_node(
&mut self,
node_id: &NodeId,
) -> Result<DroppedNode, RuntimeError>
fn kernel_drop_node( &mut self, node_id: &NodeId, ) -> Result<DroppedNode, RuntimeError>
Source§fn kernel_allocate_node_id(
&mut self,
entity_type: EntityType,
) -> Result<NodeId, RuntimeError>
fn kernel_allocate_node_id( &mut self, entity_type: EntityType, ) -> Result<NodeId, RuntimeError>
Source§fn kernel_create_node(
&mut self,
node_id: NodeId,
node_substates: BTreeMap<PartitionNumber, BTreeMap<SubstateKey, IndexedScryptoValue>>,
) -> Result<(), RuntimeError>
fn kernel_create_node( &mut self, node_id: NodeId, node_substates: BTreeMap<PartitionNumber, BTreeMap<SubstateKey, IndexedScryptoValue>>, ) -> Result<(), RuntimeError>
fn kernel_create_node_from( &mut self, node_id: NodeId, partitions: BTreeMap<PartitionNumber, (NodeId, PartitionNumber)>, ) -> Result<(), RuntimeError>
Source§impl<'a, Y> KernelSubstateApi<SystemLockData> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
impl<'a, Y> KernelSubstateApi<SystemLockData> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
Source§fn kernel_mark_substate_as_transient(
&mut self,
node_id: NodeId,
partition_num: PartitionNumber,
key: SubstateKey,
) -> Result<(), RuntimeError>
fn kernel_mark_substate_as_transient( &mut self, node_id: NodeId, partition_num: PartitionNumber, key: SubstateKey, ) -> Result<(), RuntimeError>
Source§fn kernel_open_substate_with_default<F>(
&mut self,
node_id: &NodeId,
partition_num: PartitionNumber,
substate_key: &SubstateKey,
flags: LockFlags,
default: Option<F>,
data: SystemLockData,
) -> Result<u32, RuntimeError>where
F: FnOnce() -> IndexedScryptoValue,
fn kernel_open_substate_with_default<F>(
&mut self,
node_id: &NodeId,
partition_num: PartitionNumber,
substate_key: &SubstateKey,
flags: LockFlags,
default: Option<F>,
data: SystemLockData,
) -> Result<u32, RuntimeError>where
F: FnOnce() -> IndexedScryptoValue,
Source§fn kernel_get_lock_data(
&mut self,
lock_handle: u32,
) -> Result<SystemLockData, RuntimeError>
fn kernel_get_lock_data( &mut self, lock_handle: u32, ) -> Result<SystemLockData, RuntimeError>
Source§fn kernel_close_substate(
&mut self,
lock_handle: u32,
) -> Result<(), RuntimeError>
fn kernel_close_substate( &mut self, lock_handle: u32, ) -> Result<(), RuntimeError>
Source§fn kernel_read_substate(
&mut self,
lock_handle: u32,
) -> Result<&IndexedScryptoValue, RuntimeError>
fn kernel_read_substate( &mut self, lock_handle: u32, ) -> Result<&IndexedScryptoValue, RuntimeError>
Source§fn kernel_write_substate(
&mut self,
lock_handle: u32,
value: IndexedScryptoValue,
) -> Result<(), RuntimeError>
fn kernel_write_substate( &mut self, lock_handle: u32, value: IndexedScryptoValue, ) -> Result<(), RuntimeError>
Source§fn kernel_set_substate(
&mut self,
node_id: &NodeId,
partition_num: PartitionNumber,
substate_key: SubstateKey,
value: IndexedScryptoValue,
) -> Result<(), RuntimeError>
fn kernel_set_substate( &mut self, node_id: &NodeId, partition_num: PartitionNumber, substate_key: SubstateKey, value: IndexedScryptoValue, ) -> Result<(), RuntimeError>
Source§fn kernel_remove_substate(
&mut self,
node_id: &NodeId,
partition_num: PartitionNumber,
substate_key: &SubstateKey,
) -> Result<Option<IndexedScryptoValue>, RuntimeError>
fn kernel_remove_substate( &mut self, node_id: &NodeId, partition_num: PartitionNumber, substate_key: &SubstateKey, ) -> Result<Option<IndexedScryptoValue>, RuntimeError>
Source§fn kernel_scan_sorted_substates(
&mut self,
node_id: &NodeId,
partition_num: PartitionNumber,
limit: u32,
) -> Result<Vec<(([u8; 2], Vec<u8>), IndexedScryptoValue)>, RuntimeError>
fn kernel_scan_sorted_substates( &mut self, node_id: &NodeId, partition_num: PartitionNumber, limit: u32, ) -> Result<Vec<(([u8; 2], Vec<u8>), IndexedScryptoValue)>, RuntimeError>
fn kernel_scan_keys<K>(
&mut self,
node_id: &NodeId,
partition_num: PartitionNumber,
limit: u32,
) -> Result<Vec<SubstateKey>, RuntimeError>where
K: SubstateKeyContent,
fn kernel_drain_substates<K>(
&mut self,
node_id: &NodeId,
partition_num: PartitionNumber,
limit: u32,
) -> Result<Vec<(SubstateKey, IndexedScryptoValue)>, RuntimeError>where
K: SubstateKeyContent,
fn kernel_open_substate( &mut self, node_id: &NodeId, partition_num: PartitionNumber, substate_key: &SubstateKey, flags: LockFlags, lock_data: L, ) -> Result<u32, RuntimeError>
Source§impl<'a, Y> SystemActorApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
impl<'a, Y> SystemActorApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
Source§fn actor_get_blueprint_id(&mut self) -> Result<BlueprintId, RuntimeError>
fn actor_get_blueprint_id(&mut self) -> Result<BlueprintId, RuntimeError>
Source§fn actor_get_node_id(&mut self, ref_handle: u32) -> Result<NodeId, RuntimeError>
fn actor_get_node_id(&mut self, ref_handle: u32) -> Result<NodeId, RuntimeError>
Source§fn actor_is_feature_enabled(
&mut self,
object_handle: u32,
feature: &str,
) -> Result<bool, RuntimeError>
fn actor_is_feature_enabled( &mut self, object_handle: u32, feature: &str, ) -> Result<bool, RuntimeError>
Source§fn actor_open_field(
&mut self,
object_handle: u32,
field_index: u8,
flags: LockFlags,
) -> Result<u32, RuntimeError>
fn actor_open_field( &mut self, object_handle: u32, field_index: u8, flags: LockFlags, ) -> Result<u32, RuntimeError>
Source§fn actor_emit_event(
&mut self,
event_name: String,
event_data: Vec<u8>,
event_flags: EventFlags,
) -> Result<(), RuntimeError>
fn actor_emit_event( &mut self, event_name: String, event_data: Vec<u8>, event_flags: EventFlags, ) -> Result<(), RuntimeError>
Source§impl<'a, Y> SystemActorIndexApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
impl<'a, Y> SystemActorIndexApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
Source§fn actor_index_insert(
&mut self,
object_handle: u32,
collection_index: u8,
key: Vec<u8>,
buffer: Vec<u8>,
) -> Result<(), RuntimeError>
fn actor_index_insert( &mut self, object_handle: u32, collection_index: u8, key: Vec<u8>, buffer: Vec<u8>, ) -> Result<(), RuntimeError>
Source§fn actor_index_remove(
&mut self,
object_handle: u32,
collection_index: u8,
key: Vec<u8>,
) -> Result<Option<Vec<u8>>, RuntimeError>
fn actor_index_remove( &mut self, object_handle: u32, collection_index: u8, key: Vec<u8>, ) -> Result<Option<Vec<u8>>, RuntimeError>
Source§fn actor_index_scan_keys(
&mut self,
object_handle: u32,
collection_index: u8,
limit: u32,
) -> Result<Vec<Vec<u8>>, RuntimeError>
fn actor_index_scan_keys( &mut self, object_handle: u32, collection_index: u8, limit: u32, ) -> Result<Vec<Vec<u8>>, RuntimeError>
Source§fn actor_index_drain(
&mut self,
object_handle: u32,
collection_index: u8,
limit: u32,
) -> Result<Vec<(Vec<u8>, Vec<u8>)>, RuntimeError>
fn actor_index_drain( &mut self, object_handle: u32, collection_index: u8, limit: u32, ) -> Result<Vec<(Vec<u8>, Vec<u8>)>, RuntimeError>
Source§fn actor_index_insert_typed<K, V>(
&mut self,
object_handle: u32,
collection_index: u8,
key: K,
value: V,
) -> Result<(), E>where
K: ScryptoEncode,
V: ScryptoEncode,
fn actor_index_insert_typed<K, V>(
&mut self,
object_handle: u32,
collection_index: u8,
key: K,
value: V,
) -> Result<(), E>where
K: ScryptoEncode,
V: ScryptoEncode,
Source§fn actor_index_remove_typed<V>(
&mut self,
object_handle: u32,
collection_index: u8,
key: Vec<u8>,
) -> Result<Option<V>, E>where
V: ScryptoDecode,
fn actor_index_remove_typed<V>(
&mut self,
object_handle: u32,
collection_index: u8,
key: Vec<u8>,
) -> Result<Option<V>, E>where
V: ScryptoDecode,
Source§fn actor_index_scan_keys_typed<K>(
&mut self,
object_handle: u32,
collection_index: u8,
limit: u32,
) -> Result<Vec<K>, E>where
K: ScryptoDecode,
fn actor_index_scan_keys_typed<K>(
&mut self,
object_handle: u32,
collection_index: u8,
limit: u32,
) -> Result<Vec<K>, E>where
K: ScryptoDecode,
Source§fn actor_index_drain_typed<K, V>(
&mut self,
object_handle: u32,
collection_index: u8,
limit: u32,
) -> Result<Vec<(K, V)>, E>where
K: ScryptoDecode,
V: ScryptoDecode,
fn actor_index_drain_typed<K, V>(
&mut self,
object_handle: u32,
collection_index: u8,
limit: u32,
) -> Result<Vec<(K, V)>, E>where
K: ScryptoDecode,
V: ScryptoDecode,
Source§impl<'a, Y> SystemActorKeyValueEntryApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
impl<'a, Y> SystemActorKeyValueEntryApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
Source§fn actor_open_key_value_entry(
&mut self,
object_handle: u32,
collection_index: u8,
key: &Vec<u8>,
flags: LockFlags,
) -> Result<u32, RuntimeError>
fn actor_open_key_value_entry( &mut self, object_handle: u32, collection_index: u8, key: &Vec<u8>, flags: LockFlags, ) -> Result<u32, RuntimeError>
Source§fn actor_remove_key_value_entry(
&mut self,
object_handle: u32,
collection_index: u8,
key: &Vec<u8>,
) -> Result<Vec<u8>, RuntimeError>
fn actor_remove_key_value_entry( &mut self, object_handle: u32, collection_index: u8, key: &Vec<u8>, ) -> Result<Vec<u8>, RuntimeError>
Source§fn actor_remove_key_value_entry_typed<V>(
&mut self,
object_handle: u32,
collection_index: u8,
key: &Vec<u8>,
) -> Result<Option<V>, E>where
V: ScryptoDecode,
fn actor_remove_key_value_entry_typed<V>(
&mut self,
object_handle: u32,
collection_index: u8,
key: &Vec<u8>,
) -> Result<Option<V>, E>where
V: ScryptoDecode,
Source§impl<'a, Y> SystemActorSortedIndexApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
impl<'a, Y> SystemActorSortedIndexApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
Source§fn actor_sorted_index_insert(
&mut self,
object_handle: u32,
collection_index: u8,
sorted_key: ([u8; 2], Vec<u8>),
buffer: Vec<u8>,
) -> Result<(), RuntimeError>
fn actor_sorted_index_insert( &mut self, object_handle: u32, collection_index: u8, sorted_key: ([u8; 2], Vec<u8>), buffer: Vec<u8>, ) -> Result<(), RuntimeError>
Source§fn actor_sorted_index_remove(
&mut self,
object_handle: u32,
collection_index: u8,
sorted_key: &([u8; 2], Vec<u8>),
) -> Result<Option<Vec<u8>>, RuntimeError>
fn actor_sorted_index_remove( &mut self, object_handle: u32, collection_index: u8, sorted_key: &([u8; 2], Vec<u8>), ) -> Result<Option<Vec<u8>>, RuntimeError>
Source§fn actor_sorted_index_scan(
&mut self,
object_handle: u32,
collection_index: u8,
limit: u32,
) -> Result<Vec<(([u8; 2], Vec<u8>), Vec<u8>)>, RuntimeError>
fn actor_sorted_index_scan( &mut self, object_handle: u32, collection_index: u8, limit: u32, ) -> Result<Vec<(([u8; 2], Vec<u8>), Vec<u8>)>, RuntimeError>
Source§fn actor_sorted_index_insert_typed<V>(
&mut self,
object_handle: u32,
collection_index: u8,
sorted_key: ([u8; 2], Vec<u8>),
value: V,
) -> Result<(), E>where
V: ScryptoEncode,
fn actor_sorted_index_insert_typed<V>(
&mut self,
object_handle: u32,
collection_index: u8,
sorted_key: ([u8; 2], Vec<u8>),
value: V,
) -> Result<(), E>where
V: ScryptoEncode,
Source§fn actor_sorted_index_remove_typed<V>(
&mut self,
object_handle: u32,
collection_index: u8,
sorted_key: &([u8; 2], Vec<u8>),
) -> Result<Option<V>, E>where
V: ScryptoDecode,
fn actor_sorted_index_remove_typed<V>(
&mut self,
object_handle: u32,
collection_index: u8,
sorted_key: &([u8; 2], Vec<u8>),
) -> Result<Option<V>, E>where
V: ScryptoDecode,
Source§fn actor_sorted_index_scan_typed<K, V>(
&mut self,
object_handle: u32,
collection_index: u8,
count: u32,
) -> Result<Vec<(K, V)>, E>where
K: ScryptoDecode,
V: ScryptoDecode,
fn actor_sorted_index_scan_typed<K, V>(
&mut self,
object_handle: u32,
collection_index: u8,
count: u32,
) -> Result<Vec<(K, V)>, E>where
K: ScryptoDecode,
V: ScryptoDecode,
Source§impl<'a, Y> SystemBlueprintApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
impl<'a, Y> SystemBlueprintApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
Source§fn call_function(
&mut self,
package_address: PackageAddress,
blueprint_name: &str,
function_name: &str,
args: Vec<u8>,
) -> Result<Vec<u8>, RuntimeError>
fn call_function( &mut self, package_address: PackageAddress, blueprint_name: &str, function_name: &str, args: Vec<u8>, ) -> Result<Vec<u8>, RuntimeError>
Source§fn resolve_blueprint_type(
&mut self,
blueprint_type_id: &BlueprintTypeIdentifier,
) -> Result<(Rc<VersionedSchema<ScryptoCustomSchema>>, ScopedTypeId), RuntimeError>
fn resolve_blueprint_type( &mut self, blueprint_type_id: &BlueprintTypeIdentifier, ) -> Result<(Rc<VersionedSchema<ScryptoCustomSchema>>, ScopedTypeId), RuntimeError>
Source§impl<'a, Y> SystemCostingApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
impl<'a, Y> SystemCostingApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
Source§fn consume_cost_units(
&mut self,
costing_entry: ClientCostingEntry<'_>,
) -> Result<(), RuntimeError>
fn consume_cost_units( &mut self, costing_entry: ClientCostingEntry<'_>, ) -> Result<(), RuntimeError>
Source§fn start_lock_fee(
&mut self,
amount: Decimal,
contingent: bool,
) -> Result<bool, RuntimeError>
fn start_lock_fee( &mut self, amount: Decimal, contingent: bool, ) -> Result<bool, RuntimeError>
Source§fn lock_fee(&mut self, locked_fee: LiquidFungibleResource, contingent: bool)
fn lock_fee(&mut self, locked_fee: LiquidFungibleResource, contingent: bool)
Source§fn execution_cost_unit_limit(&mut self) -> Result<u32, RuntimeError>
fn execution_cost_unit_limit(&mut self) -> Result<u32, RuntimeError>
Source§fn execution_cost_unit_price(&mut self) -> Result<Decimal, RuntimeError>
fn execution_cost_unit_price(&mut self) -> Result<Decimal, RuntimeError>
Source§fn finalization_cost_unit_limit(&mut self) -> Result<u32, RuntimeError>
fn finalization_cost_unit_limit(&mut self) -> Result<u32, RuntimeError>
Source§fn finalization_cost_unit_price(&mut self) -> Result<Decimal, RuntimeError>
fn finalization_cost_unit_price(&mut self) -> Result<Decimal, RuntimeError>
Source§fn max_per_function_royalty_in_xrd(&mut self) -> Result<Decimal, RuntimeError>
fn max_per_function_royalty_in_xrd(&mut self) -> Result<Decimal, RuntimeError>
Source§fn tip_percentage_truncated(&mut self) -> Result<u32, RuntimeError>
fn tip_percentage_truncated(&mut self) -> Result<u32, RuntimeError>
Source§fn fee_balance(&mut self) -> Result<Decimal, RuntimeError>
fn fee_balance(&mut self) -> Result<Decimal, RuntimeError>
Source§impl<'a, Y> SystemExecutionTraceApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
impl<'a, Y> SystemExecutionTraceApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
fn update_instruction_index( &mut self, new_index: usize, ) -> Result<(), RuntimeError>
Source§impl<'a, Y> SystemFieldApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
impl<'a, Y> SystemFieldApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
Source§fn field_read(&mut self, handle: u32) -> Result<Vec<u8>, RuntimeError>
fn field_read(&mut self, handle: u32) -> Result<Vec<u8>, RuntimeError>
Source§fn field_write(
&mut self,
handle: u32,
buffer: Vec<u8>,
) -> Result<(), RuntimeError>
fn field_write( &mut self, handle: u32, buffer: Vec<u8>, ) -> Result<(), RuntimeError>
Source§fn field_lock(&mut self, handle: u32) -> Result<(), RuntimeError>
fn field_lock(&mut self, handle: u32) -> Result<(), RuntimeError>
Source§fn field_close(&mut self, handle: u32) -> Result<(), RuntimeError>
fn field_close(&mut self, handle: u32) -> Result<(), RuntimeError>
Source§fn field_read_typed<S>(&mut self, handle: u32) -> Result<S, E>where
S: ScryptoDecode,
fn field_read_typed<S>(&mut self, handle: u32) -> Result<S, E>where
S: ScryptoDecode,
Source§fn field_write_typed<S>(&mut self, handle: u32, substate: &S) -> Result<(), E>where
S: ScryptoEncode,
fn field_write_typed<S>(&mut self, handle: u32, substate: &S) -> Result<(), E>where
S: ScryptoEncode,
Source§impl<'a, Y> SystemKeyValueEntryApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
impl<'a, Y> SystemKeyValueEntryApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
Source§fn key_value_entry_get(&mut self, handle: u32) -> Result<Vec<u8>, RuntimeError>
fn key_value_entry_get(&mut self, handle: u32) -> Result<Vec<u8>, RuntimeError>
Source§fn key_value_entry_lock(&mut self, handle: u32) -> Result<(), RuntimeError>
fn key_value_entry_lock(&mut self, handle: u32) -> Result<(), RuntimeError>
Source§fn key_value_entry_remove(
&mut self,
handle: u32,
) -> Result<Vec<u8>, RuntimeError>
fn key_value_entry_remove( &mut self, handle: u32, ) -> Result<Vec<u8>, RuntimeError>
Source§fn key_value_entry_set(
&mut self,
handle: u32,
buffer: Vec<u8>,
) -> Result<(), RuntimeError>
fn key_value_entry_set( &mut self, handle: u32, buffer: Vec<u8>, ) -> Result<(), RuntimeError>
Source§fn key_value_entry_close(&mut self, handle: u32) -> Result<(), RuntimeError>
fn key_value_entry_close(&mut self, handle: u32) -> Result<(), RuntimeError>
Source§fn key_value_entry_get_typed<S>(&mut self, handle: u32) -> Result<Option<S>, E>where
S: ScryptoDecode,
fn key_value_entry_get_typed<S>(&mut self, handle: u32) -> Result<Option<S>, E>where
S: ScryptoDecode,
Source§fn key_value_entry_set_typed<S>(
&mut self,
handle: u32,
value: S,
) -> Result<(), E>where
S: ScryptoEncode,
fn key_value_entry_set_typed<S>(
&mut self,
handle: u32,
value: S,
) -> Result<(), E>where
S: ScryptoEncode,
Source§impl<'a, Y> SystemKeyValueStoreApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
impl<'a, Y> SystemKeyValueStoreApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
Source§fn key_value_store_new(
&mut self,
data_schema: KeyValueStoreDataSchema,
) -> Result<NodeId, RuntimeError>
fn key_value_store_new( &mut self, data_schema: KeyValueStoreDataSchema, ) -> Result<NodeId, RuntimeError>
Source§fn key_value_store_open_entry(
&mut self,
node_id: &NodeId,
key: &Vec<u8>,
flags: LockFlags,
) -> Result<u32, RuntimeError>
fn key_value_store_open_entry( &mut self, node_id: &NodeId, key: &Vec<u8>, flags: LockFlags, ) -> Result<u32, RuntimeError>
Source§fn key_value_store_remove_entry(
&mut self,
node_id: &NodeId,
key: &Vec<u8>,
) -> Result<Vec<u8>, RuntimeError>
fn key_value_store_remove_entry( &mut self, node_id: &NodeId, key: &Vec<u8>, ) -> Result<Vec<u8>, RuntimeError>
Source§impl<'a, Y> SystemObjectApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
impl<'a, Y> SystemObjectApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
Source§fn new_object(
&mut self,
blueprint_ident: &str,
features: Vec<&str>,
generic_args: GenericArgs,
fields: IndexMap<u8, FieldValue>,
kv_entries: IndexMap<u8, IndexMap<Vec<u8>, KVEntry>>,
) -> Result<NodeId, RuntimeError>
fn new_object( &mut self, blueprint_ident: &str, features: Vec<&str>, generic_args: GenericArgs, fields: IndexMap<u8, FieldValue>, kv_entries: IndexMap<u8, IndexMap<Vec<u8>, KVEntry>>, ) -> Result<NodeId, RuntimeError>
Source§fn allocate_global_address(
&mut self,
blueprint_id: BlueprintId,
) -> Result<(GlobalAddressReservation, GlobalAddress), RuntimeError>
fn allocate_global_address( &mut self, blueprint_id: BlueprintId, ) -> Result<(GlobalAddressReservation, GlobalAddress), RuntimeError>
Source§fn allocate_virtual_global_address(
&mut self,
blueprint_id: BlueprintId,
global_address: GlobalAddress,
) -> Result<GlobalAddressReservation, RuntimeError>
fn allocate_virtual_global_address( &mut self, blueprint_id: BlueprintId, global_address: GlobalAddress, ) -> Result<GlobalAddressReservation, RuntimeError>
Source§fn globalize(
&mut self,
node_id: NodeId,
modules: IndexMap<AttachedModuleId, NodeId>,
address_reservation: Option<GlobalAddressReservation>,
) -> Result<GlobalAddress, RuntimeError>
fn globalize( &mut self, node_id: NodeId, modules: IndexMap<AttachedModuleId, NodeId>, address_reservation: Option<GlobalAddressReservation>, ) -> Result<GlobalAddress, RuntimeError>
Source§fn globalize_with_address_and_create_inner_object_and_emit_event(
&mut self,
node_id: NodeId,
modules: IndexMap<AttachedModuleId, NodeId>,
address_reservation: GlobalAddressReservation,
inner_object_blueprint: &str,
inner_object_fields: IndexMap<u8, FieldValue>,
event_name: &str,
event_data: Vec<u8>,
) -> Result<(GlobalAddress, NodeId), RuntimeError>
fn globalize_with_address_and_create_inner_object_and_emit_event( &mut self, node_id: NodeId, modules: IndexMap<AttachedModuleId, NodeId>, address_reservation: GlobalAddressReservation, inner_object_blueprint: &str, inner_object_fields: IndexMap<u8, FieldValue>, event_name: &str, event_data: Vec<u8>, ) -> Result<(GlobalAddress, NodeId), RuntimeError>
Source§fn call_method(
&mut self,
receiver: &NodeId,
method_name: &str,
args: Vec<u8>,
) -> Result<Vec<u8>, RuntimeError>
fn call_method( &mut self, receiver: &NodeId, method_name: &str, args: Vec<u8>, ) -> Result<Vec<u8>, RuntimeError>
Source§fn call_direct_access_method(
&mut self,
receiver: &NodeId,
method_name: &str,
args: Vec<u8>,
) -> Result<Vec<u8>, RuntimeError>
fn call_direct_access_method( &mut self, receiver: &NodeId, method_name: &str, args: Vec<u8>, ) -> Result<Vec<u8>, RuntimeError>
Source§fn call_module_method(
&mut self,
receiver: &NodeId,
module_id: AttachedModuleId,
method_name: &str,
args: Vec<u8>,
) -> Result<Vec<u8>, RuntimeError>
fn call_module_method( &mut self, receiver: &NodeId, module_id: AttachedModuleId, method_name: &str, args: Vec<u8>, ) -> Result<Vec<u8>, RuntimeError>
Source§fn get_blueprint_id(
&mut self,
node_id: &NodeId,
) -> Result<BlueprintId, RuntimeError>
fn get_blueprint_id( &mut self, node_id: &NodeId, ) -> Result<BlueprintId, RuntimeError>
Source§fn get_outer_object(
&mut self,
node_id: &NodeId,
) -> Result<GlobalAddress, RuntimeError>
fn get_outer_object( &mut self, node_id: &NodeId, ) -> Result<GlobalAddress, RuntimeError>
Source§fn get_reservation_address(
&mut self,
node_id: &NodeId,
) -> Result<GlobalAddress, RuntimeError>
fn get_reservation_address( &mut self, node_id: &NodeId, ) -> Result<GlobalAddress, RuntimeError>
Source§fn drop_object(
&mut self,
node_id: &NodeId,
) -> Result<Vec<Vec<u8>>, RuntimeError>
fn drop_object( &mut self, node_id: &NodeId, ) -> Result<Vec<Vec<u8>>, RuntimeError>
Source§fn new_simple_object(
&mut self,
blueprint_ident: &str,
fields: IndexMap<u8, FieldValue>,
) -> Result<NodeId, E>
fn new_simple_object( &mut self, blueprint_ident: &str, fields: IndexMap<u8, FieldValue>, ) -> Result<NodeId, E>
Source§impl<'a, Y> SystemTransactionRuntimeApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
impl<'a, Y> SystemTransactionRuntimeApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
Source§fn get_transaction_hash(&mut self) -> Result<Hash, RuntimeError>
fn get_transaction_hash(&mut self) -> Result<Hash, RuntimeError>
Source§fn generate_ruid(&mut self) -> Result<[u8; 32], RuntimeError>
fn generate_ruid(&mut self) -> Result<[u8; 32], RuntimeError>
Source§fn bech32_encode_address(
&mut self,
address: GlobalAddress,
) -> Result<String, RuntimeError>
fn bech32_encode_address( &mut self, address: GlobalAddress, ) -> Result<String, RuntimeError>
impl<'a, Y> SystemApi<RuntimeError> for SystemService<'a, Y>where
Y: SystemBasedKernelApi,
Auto Trait Implementations§
impl<'a, Y> Freeze for SystemService<'a, Y>where
Y: ?Sized,
impl<'a, Y> RefUnwindSafe for SystemService<'a, Y>where
Y: RefUnwindSafe + ?Sized,
impl<'a, Y> Send for SystemService<'a, Y>
impl<'a, Y> Sync for SystemService<'a, Y>
impl<'a, Y> Unpin for SystemService<'a, Y>where
Y: ?Sized,
impl<'a, Y> !UnwindSafe for SystemService<'a, Y>
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, U> ContextualTryInto<U> for Twhere
U: ContextualTryFrom<T>,
impl<T, U> ContextualTryInto<U> for Twhere
U: ContextualTryFrom<T>,
type Error = <U as ContextualTryFrom<T>>::Error
type Context = <U as ContextualTryFrom<T>>::Context
fn contextual_try_into( self, context: &<U as ContextualTryFrom<T>>::Context, ) -> Result<U, <U as ContextualTryFrom<T>>::Error>
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more