pub enum RuntimeError {
KernelError(KernelError),
SystemError(SystemError),
SystemModuleError(SystemModuleError),
SystemUpstreamError(SystemUpstreamError),
VmError(VmError),
ApplicationError(ApplicationError),
FinalizationCostingError(CostingError),
}
Expand description
Represents an error when executing a transaction.
Variants§
KernelError(KernelError)
An error occurred within the kernel.
SystemError(SystemError)
An error occurred within the system, notably the SystemAPI implementation.
SystemModuleError(SystemModuleError)
An error occurred within a specific system module, like auth, costing and royalty. TODO: merge into SystemError?
SystemUpstreamError(SystemUpstreamError)
An error issued by the system when invoking upstream (such as blueprints, node modules). TODO: merge into SystemError?
VmError(VmError)
An error occurred in the vm layer
ApplicationError(ApplicationError)
An error occurred within application logic, like the RE models.
FinalizationCostingError(CostingError)
Implementations§
Source§impl RuntimeError
impl RuntimeError
pub fn create_persistable(&self) -> PersistableRuntimeError
Trait Implementations§
Source§impl CanBeAbortion for RuntimeError
impl CanBeAbortion for RuntimeError
fn abortion(&self) -> Option<&AbortReason>
Source§impl Clone for RuntimeError
impl Clone for RuntimeError
Source§fn clone(&self) -> RuntimeError
fn clone(&self) -> RuntimeError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> ContextualDisplay<ScryptoValueDisplayContext<'a>> for RuntimeError
impl<'a> ContextualDisplay<ScryptoValueDisplayContext<'a>> for RuntimeError
type Error = Error
Source§fn contextual_format<F: Write>(
&self,
f: &mut F,
context: &ScryptoValueDisplayContext<'_>,
) -> Result<(), Self::Error>
fn contextual_format<F: Write>( &self, f: &mut F, context: &ScryptoValueDisplayContext<'_>, ) -> Result<(), Self::Error>
Formats the value to the given
fmt::Write
buffer, making use of the provided context.
See also format
, which is typically easier to use, as it takes an Into<Context>
instead of a &Context
.Source§fn format<F, TContext>(
&self,
f: &mut F,
context: TContext,
) -> Result<(), Self::Error>
fn format<F, TContext>( &self, f: &mut F, context: TContext, ) -> Result<(), Self::Error>
Formats the value to the given
fmt::Write
buffer, making use of the provided context.
See also contextual_format
, which takes a &Context
instead of an Into<Context>
. Read moreSource§fn display<'a, 'b, TContext>(
&'a self,
context: TContext,
) -> ContextDisplayable<'a, Self, Context>where
TContext: Into<Context>,
fn display<'a, 'b, TContext>(
&'a self,
context: TContext,
) -> ContextDisplayable<'a, Self, Context>where
TContext: Into<Context>,
fn to_string<'a, 'b, TContext>(&'a self, context: TContext) -> Stringwhere
TContext: Into<Context>,
Source§impl Debug for RuntimeError
impl Debug for RuntimeError
Source§impl<D: Decoder<ScryptoCustomValueKind>> Decode<ScryptoCustomValueKind, D> for RuntimeError
impl<D: Decoder<ScryptoCustomValueKind>> Decode<ScryptoCustomValueKind, D> for RuntimeError
Source§fn decode_body_with_value_kind(
decoder: &mut D,
value_kind: ValueKind<ScryptoCustomValueKind>,
) -> Result<Self, DecodeError>
fn decode_body_with_value_kind( decoder: &mut D, value_kind: ValueKind<ScryptoCustomValueKind>, ) -> Result<Self, DecodeError>
Decodes the type from the decoder, which should match a preloaded value kind. Read more
Source§impl Describe<ScryptoCustomTypeKind> for RuntimeError
impl Describe<ScryptoCustomTypeKind> for RuntimeError
Source§const TYPE_ID: RustTypeId
const TYPE_ID: RustTypeId
The
TYPE_ID
should give a unique identifier for its SBOR schema type.
An SBOR schema type capture details about the SBOR payload, how it should be interpreted, validated and displayed. Read moreSource§fn type_data() -> TypeData<ScryptoCustomTypeKind, RustTypeId>
fn type_data() -> TypeData<ScryptoCustomTypeKind, RustTypeId>
Returns the local schema for the given type. Read more
Source§fn add_all_dependencies(aggregator: &mut TypeAggregator<ScryptoCustomTypeKind>)
fn add_all_dependencies(aggregator: &mut TypeAggregator<ScryptoCustomTypeKind>)
For each type referenced in
get_local_type_data
, we need to ensure that the type and all of its own references
get added to the aggregator. Read moreSource§impl<E: Encoder<ScryptoCustomValueKind>> Encode<ScryptoCustomValueKind, E> for RuntimeError
impl<E: Encoder<ScryptoCustomValueKind>> Encode<ScryptoCustomValueKind, E> for RuntimeError
Source§fn encode_value_kind(&self, encoder: &mut E) -> Result<(), EncodeError>
fn encode_value_kind(&self, encoder: &mut E) -> Result<(), EncodeError>
Encodes the SBOR value’s kind to the encoder
Source§fn encode_body(&self, encoder: &mut E) -> Result<(), EncodeError>
fn encode_body(&self, encoder: &mut E) -> Result<(), EncodeError>
Encodes the SBOR body of the type to the encoder. Read more
Source§impl From<AccessControllerError> for RuntimeError
impl From<AccessControllerError> for RuntimeError
Source§fn from(value: AccessControllerError) -> Self
fn from(value: AccessControllerError) -> Self
Converts to this type from the input type.
Source§impl From<AccountError> for RuntimeError
impl From<AccountError> for RuntimeError
Source§fn from(value: AccountError) -> Self
fn from(value: AccountError) -> Self
Converts to this type from the input type.
Source§impl From<ApplicationError> for RuntimeError
impl From<ApplicationError> for RuntimeError
Source§fn from(error: ApplicationError) -> Self
fn from(error: ApplicationError) -> Self
Converts to this type from the input type.
Source§impl From<BucketError> for RuntimeError
impl From<BucketError> for RuntimeError
Source§fn from(bucket_error: BucketError) -> Self
fn from(bucket_error: BucketError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for RuntimeError
impl From<Error> for RuntimeError
Source§impl From<Error> for RuntimeError
impl From<Error> for RuntimeError
Source§impl From<Error> for RuntimeError
impl From<Error> for RuntimeError
Source§impl<E: SelfError> From<InvokeError<E>> for RuntimeError
impl<E: SelfError> From<InvokeError<E>> for RuntimeError
Source§fn from(error: InvokeError<E>) -> Self
fn from(error: InvokeError<E>) -> Self
Converts to this type from the input type.
Source§impl From<KernelError> for RuntimeError
impl From<KernelError> for RuntimeError
Source§fn from(error: KernelError) -> Self
fn from(error: KernelError) -> Self
Converts to this type from the input type.
Source§impl<E: SelfError> From<RuntimeError> for InvokeError<E>
impl<E: SelfError> From<RuntimeError> for InvokeError<E>
Source§fn from(runtime_error: RuntimeError) -> Self
fn from(runtime_error: RuntimeError) -> Self
Converts to this type from the input type.
Source§impl From<SystemModuleError> for RuntimeError
impl From<SystemModuleError> for RuntimeError
Source§fn from(error: SystemModuleError) -> Self
fn from(error: SystemModuleError) -> Self
Converts to this type from the input type.
Source§impl From<SystemUpstreamError> for RuntimeError
impl From<SystemUpstreamError> for RuntimeError
Source§fn from(error: SystemUpstreamError) -> Self
fn from(error: SystemUpstreamError) -> Self
Converts to this type from the input type.
Source§impl<T> From<T> for RuntimeErrorwhere
T: Into<CallFrameError>,
impl<T> From<T> for RuntimeErrorwhere
T: Into<CallFrameError>,
Source§impl From<TransactionProcessorError> for RuntimeError
impl From<TransactionProcessorError> for RuntimeError
Source§fn from(value: TransactionProcessorError) -> Self
fn from(value: TransactionProcessorError) -> Self
Converts to this type from the input type.
Source§impl From<VaultError> for RuntimeError
impl From<VaultError> for RuntimeError
Source§fn from(error: VaultError) -> Self
fn from(error: VaultError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RuntimeError
impl PartialEq for RuntimeError
Source§impl SborEnum<ScryptoCustomValueKind> for RuntimeError
impl SborEnum<ScryptoCustomValueKind> for RuntimeError
fn get_discriminator(&self) -> u8
fn get_length(&self) -> usize
Source§impl<'a, Y: SystemBasedKernelApi> SystemActorApi<RuntimeError> for SystemService<'a, Y>
impl<'a, Y: SystemBasedKernelApi> SystemActorApi<RuntimeError> for SystemService<'a, Y>
Source§fn actor_get_blueprint_id(&mut self) -> Result<BlueprintId, RuntimeError>
fn actor_get_blueprint_id(&mut self) -> Result<BlueprintId, RuntimeError>
Retrieve the current blueprint id
Source§fn actor_get_node_id(
&mut self,
ref_handle: ActorRefHandle,
) -> Result<NodeId, RuntimeError>
fn actor_get_node_id( &mut self, ref_handle: ActorRefHandle, ) -> Result<NodeId, RuntimeError>
Retrieve the current method actor’s node id
Source§fn actor_is_feature_enabled(
&mut self,
object_handle: ActorStateHandle,
feature: &str,
) -> Result<bool, RuntimeError>
fn actor_is_feature_enabled( &mut self, object_handle: ActorStateHandle, feature: &str, ) -> Result<bool, RuntimeError>
Check if a feature is enabled for a given object
Source§fn actor_open_field(
&mut self,
object_handle: ActorStateHandle,
field_index: u8,
flags: LockFlags,
) -> Result<SubstateHandle, RuntimeError>
fn actor_open_field( &mut self, object_handle: ActorStateHandle, field_index: u8, flags: LockFlags, ) -> Result<SubstateHandle, RuntimeError>
Open a field in a given object for reading/writing
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>
Emits an event of the current actor
Source§impl<'a, Y: SystemBasedKernelApi> SystemActorIndexApi<RuntimeError> for SystemService<'a, Y>
impl<'a, Y: SystemBasedKernelApi> SystemActorIndexApi<RuntimeError> for SystemService<'a, Y>
Source§fn actor_index_insert(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
key: Vec<u8>,
buffer: Vec<u8>,
) -> Result<(), RuntimeError>
fn actor_index_insert( &mut self, object_handle: ActorStateHandle, collection_index: CollectionIndex, key: Vec<u8>, buffer: Vec<u8>, ) -> Result<(), RuntimeError>
Inserts an entry into an index
Source§fn actor_index_remove(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
key: Vec<u8>,
) -> Result<Option<Vec<u8>>, RuntimeError>
fn actor_index_remove( &mut self, object_handle: ActorStateHandle, collection_index: CollectionIndex, key: Vec<u8>, ) -> Result<Option<Vec<u8>>, RuntimeError>
Removes an entry from an index
Source§fn actor_index_scan_keys(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
limit: u32,
) -> Result<Vec<Vec<u8>>, RuntimeError>
fn actor_index_scan_keys( &mut self, object_handle: ActorStateHandle, collection_index: CollectionIndex, limit: u32, ) -> Result<Vec<Vec<u8>>, RuntimeError>
Scans arbitrary elements of count from an index
Source§fn actor_index_drain(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
limit: u32,
) -> Result<Vec<(Vec<u8>, Vec<u8>)>, RuntimeError>
fn actor_index_drain( &mut self, object_handle: ActorStateHandle, collection_index: CollectionIndex, limit: u32, ) -> Result<Vec<(Vec<u8>, Vec<u8>)>, RuntimeError>
Removes and returns arbitrary elements of count from an index
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,
Inserts an entry into an index
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,
Removes an entry from an index
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,
Scans arbitrary elements of count from an index
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,
Removes and returns arbitrary elements of count from an index
Source§impl<'a, Y: SystemBasedKernelApi> SystemActorKeyValueEntryApi<RuntimeError> for SystemService<'a, Y>
impl<'a, Y: SystemBasedKernelApi> SystemActorKeyValueEntryApi<RuntimeError> for SystemService<'a, Y>
Source§fn actor_open_key_value_entry(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
key: &Vec<u8>,
flags: LockFlags,
) -> Result<KeyValueEntryHandle, RuntimeError>
fn actor_open_key_value_entry( &mut self, object_handle: ActorStateHandle, collection_index: CollectionIndex, key: &Vec<u8>, flags: LockFlags, ) -> Result<KeyValueEntryHandle, RuntimeError>
Returns a handle for a specified key value entry in a collection. If an invalid collection
index or key is passed an error is returned.
Source§fn actor_remove_key_value_entry(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
key: &Vec<u8>,
) -> Result<Vec<u8>, RuntimeError>
fn actor_remove_key_value_entry( &mut self, object_handle: ActorStateHandle, collection_index: CollectionIndex, key: &Vec<u8>, ) -> Result<Vec<u8>, RuntimeError>
Removes an entry from a collection. If an invalid collection index or key is passed an
error is returned, otherwise the encoding of a value of the entry is returned.
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,
Removes an entry from a collection. If an invalid collection index or key is passed an
error is returned, otherwise the value of the entry is returned.
Source§impl<'a, Y: SystemBasedKernelApi> SystemActorSortedIndexApi<RuntimeError> for SystemService<'a, Y>
impl<'a, Y: SystemBasedKernelApi> SystemActorSortedIndexApi<RuntimeError> for SystemService<'a, Y>
Source§fn actor_sorted_index_insert(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
sorted_key: SortedKey,
buffer: Vec<u8>,
) -> Result<(), RuntimeError>
fn actor_sorted_index_insert( &mut self, object_handle: ActorStateHandle, collection_index: CollectionIndex, sorted_key: SortedKey, buffer: Vec<u8>, ) -> Result<(), RuntimeError>
Inserts an entry into a sorted index
Source§fn actor_sorted_index_remove(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
sorted_key: &SortedKey,
) -> Result<Option<Vec<u8>>, RuntimeError>
fn actor_sorted_index_remove( &mut self, object_handle: ActorStateHandle, collection_index: CollectionIndex, sorted_key: &SortedKey, ) -> Result<Option<Vec<u8>>, RuntimeError>
Removes an entry from a sorted index
Source§fn actor_sorted_index_scan(
&mut self,
object_handle: ActorStateHandle,
collection_index: CollectionIndex,
limit: u32,
) -> Result<Vec<(SortedKey, Vec<u8>)>, RuntimeError>
fn actor_sorted_index_scan( &mut self, object_handle: ActorStateHandle, collection_index: CollectionIndex, limit: u32, ) -> Result<Vec<(SortedKey, Vec<u8>)>, RuntimeError>
Scans the first elements of count from a sorted index
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,
Inserts an entry into a sorted index
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,
Removes an entry from a sorted index
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,
Scans the first elements of count from a sorted index
Source§impl<'a, Y: SystemBasedKernelApi> SystemBlueprintApi<RuntimeError> for SystemService<'a, Y>
impl<'a, Y: SystemBasedKernelApi> SystemBlueprintApi<RuntimeError> for SystemService<'a, Y>
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>
Calls a function on a blueprint
Source§fn resolve_blueprint_type(
&mut self,
blueprint_type_id: &BlueprintTypeIdentifier,
) -> Result<(Rc<VersionedScryptoSchema>, ScopedTypeId), RuntimeError>
fn resolve_blueprint_type( &mut self, blueprint_type_id: &BlueprintTypeIdentifier, ) -> Result<(Rc<VersionedScryptoSchema>, ScopedTypeId), RuntimeError>
Retrieves the schema of type under a blueprint
Source§impl<'a, Y: SystemBasedKernelApi> SystemCostingApi<RuntimeError> for SystemService<'a, Y>
impl<'a, Y: SystemBasedKernelApi> SystemCostingApi<RuntimeError> for SystemService<'a, Y>
Source§fn consume_cost_units(
&mut self,
costing_entry: ClientCostingEntry<'_>,
) -> Result<(), RuntimeError>
fn consume_cost_units( &mut self, costing_entry: ClientCostingEntry<'_>, ) -> Result<(), RuntimeError>
Consume an amount of cost units.
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>
Check if costing is enabled.
Source§fn lock_fee(&mut self, locked_fee: LiquidFungibleResource, contingent: bool)
fn lock_fee(&mut self, locked_fee: LiquidFungibleResource, contingent: bool)
Add cost units to the reserve. This should never fail.
Source§fn execution_cost_unit_limit(&mut self) -> Result<u32, RuntimeError>
fn execution_cost_unit_limit(&mut self) -> Result<u32, RuntimeError>
Retrieve the cost unit limit for the transaction
Source§fn execution_cost_unit_price(&mut self) -> Result<Decimal, RuntimeError>
fn execution_cost_unit_price(&mut self) -> Result<Decimal, RuntimeError>
Retrieve the cost unit price in XRD
Source§fn finalization_cost_unit_limit(&mut self) -> Result<u32, RuntimeError>
fn finalization_cost_unit_limit(&mut self) -> Result<u32, RuntimeError>
Retrieve the finalization cost unit limit
Source§fn finalization_cost_unit_price(&mut self) -> Result<Decimal, RuntimeError>
fn finalization_cost_unit_price(&mut self) -> Result<Decimal, RuntimeError>
Retrieve the finalization cost unit price in XRD
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>
Retrieve the maximum allowable royalty per function
Source§fn tip_percentage_truncated(&mut self) -> Result<u32, RuntimeError>
fn tip_percentage_truncated(&mut self) -> Result<u32, RuntimeError>
Retrieve the tip percentage of the transaction
Source§fn fee_balance(&mut self) -> Result<Decimal, RuntimeError>
fn fee_balance(&mut self) -> Result<Decimal, RuntimeError>
Retrieve the current fee balance in XRD
Source§impl<'a, Y: SystemBasedKernelApi> SystemExecutionTraceApi<RuntimeError> for SystemService<'a, Y>
impl<'a, Y: SystemBasedKernelApi> SystemExecutionTraceApi<RuntimeError> for SystemService<'a, Y>
fn update_instruction_index( &mut self, new_index: usize, ) -> Result<(), RuntimeError>
Source§impl<'a, Y: SystemBasedKernelApi> SystemFieldApi<RuntimeError> for SystemService<'a, Y>
impl<'a, Y: SystemBasedKernelApi> SystemFieldApi<RuntimeError> for SystemService<'a, Y>
Source§fn field_read(&mut self, handle: FieldHandle) -> Result<Vec<u8>, RuntimeError>
fn field_read(&mut self, handle: FieldHandle) -> Result<Vec<u8>, RuntimeError>
Retrieve the value of a field
Source§fn field_write(
&mut self,
handle: FieldHandle,
buffer: Vec<u8>,
) -> Result<(), RuntimeError>
fn field_write( &mut self, handle: FieldHandle, buffer: Vec<u8>, ) -> Result<(), RuntimeError>
Write a value to a field
Source§fn field_lock(&mut self, handle: FieldHandle) -> Result<(), RuntimeError>
fn field_lock(&mut self, handle: FieldHandle) -> Result<(), RuntimeError>
Lock a field such that it becomes immutable
Source§fn field_close(&mut self, handle: FieldHandle) -> Result<(), RuntimeError>
fn field_close(&mut self, handle: FieldHandle) -> Result<(), RuntimeError>
Close a field handle so that it is no longer usable
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,
Retrieve the value of a field
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,
Write a value to a field
Source§impl<'a, Y: SystemBasedKernelApi> SystemKeyValueEntryApi<RuntimeError> for SystemService<'a, Y>
impl<'a, Y: SystemBasedKernelApi> SystemKeyValueEntryApi<RuntimeError> for SystemService<'a, Y>
Source§fn key_value_entry_get(
&mut self,
handle: KeyValueEntryHandle,
) -> Result<Vec<u8>, RuntimeError>
fn key_value_entry_get( &mut self, handle: KeyValueEntryHandle, ) -> Result<Vec<u8>, RuntimeError>
Reads the value of a key value entry
Source§fn key_value_entry_lock(
&mut self,
handle: KeyValueEntryHandle,
) -> Result<(), RuntimeError>
fn key_value_entry_lock( &mut self, handle: KeyValueEntryHandle, ) -> Result<(), RuntimeError>
Lock the value of a key value entry making the value immutable
Source§fn key_value_entry_remove(
&mut self,
handle: KeyValueEntryHandle,
) -> Result<Vec<u8>, RuntimeError>
fn key_value_entry_remove( &mut self, handle: KeyValueEntryHandle, ) -> Result<Vec<u8>, RuntimeError>
Remove the value of a key value entry
Source§fn key_value_entry_set(
&mut self,
handle: KeyValueEntryHandle,
buffer: Vec<u8>,
) -> Result<(), RuntimeError>
fn key_value_entry_set( &mut self, handle: KeyValueEntryHandle, buffer: Vec<u8>, ) -> Result<(), RuntimeError>
Set the value of a key value entry
Source§fn key_value_entry_close(
&mut self,
handle: KeyValueEntryHandle,
) -> Result<(), RuntimeError>
fn key_value_entry_close( &mut self, handle: KeyValueEntryHandle, ) -> Result<(), RuntimeError>
Close the handle into the key value entry rendering it unusable after close
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,
Reads the value of a key value entry and decodes it into a specific type
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,
Set the value of a key value entry
Source§impl<'a, Y: SystemBasedKernelApi> SystemKeyValueStoreApi<RuntimeError> for SystemService<'a, Y>
impl<'a, Y: SystemBasedKernelApi> SystemKeyValueStoreApi<RuntimeError> for SystemService<'a, Y>
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>
Creates a new key value store with a given schema
Source§fn key_value_store_open_entry(
&mut self,
node_id: &NodeId,
key: &Vec<u8>,
flags: LockFlags,
) -> Result<KeyValueEntryHandle, RuntimeError>
fn key_value_store_open_entry( &mut self, node_id: &NodeId, key: &Vec<u8>, flags: LockFlags, ) -> Result<KeyValueEntryHandle, RuntimeError>
Open a key value store entry for reading/writing
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>
Removes an entry from a key value store
Source§impl<'a, Y: SystemBasedKernelApi> SystemObjectApi<RuntimeError> for SystemService<'a, Y>
impl<'a, Y: SystemBasedKernelApi> SystemObjectApi<RuntimeError> for SystemService<'a, Y>
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>
Creates a new object of a given blueprint type
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>
Allocates a global address, for a future globalization.
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>
Allocates a specific virtual global address
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>
Moves an object currently in the heap into the global space making
it accessible to all with the provided global address.
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>
Globalizes with a new inner object and emits an event
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>
Calls a method on an object
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>
Calls a direct access method on an object
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>
Calls a method on an object module
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>
Get the blueprint id of a visible object
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>
Get the outer object of a visible object
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>
Retrieve the global address of a given address reservation
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>
Drops an owned object, returns the fields of the object
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>
Creates a new simple blueprint object of a given blueprint type
Source§impl<'a, Y: SystemBasedKernelApi> SystemTransactionRuntimeApi<RuntimeError> for SystemService<'a, Y>
impl<'a, Y: SystemBasedKernelApi> SystemTransactionRuntimeApi<RuntimeError> for SystemService<'a, Y>
Source§fn get_transaction_hash(&mut self) -> Result<Hash, RuntimeError>
fn get_transaction_hash(&mut self) -> Result<Hash, RuntimeError>
Retrieve the hash of the current transaction which is running.
Source§fn generate_ruid(&mut self) -> Result<[u8; 32], RuntimeError>
fn generate_ruid(&mut self) -> Result<[u8; 32], RuntimeError>
Generate a unique id
Source§fn bech32_encode_address(
&mut self,
address: GlobalAddress,
) -> Result<String, RuntimeError>
fn bech32_encode_address( &mut self, address: GlobalAddress, ) -> Result<String, RuntimeError>
Encode an address into Bech32. The HRP part is dependent on the network which is running.
Source§impl<'a, 'e, Y: SystemApi<RuntimeError>> TransformHandler<RuntimeError> for IntentProcessorObjectsWithApi<'a, 'e, Y>
impl<'a, 'e, Y: SystemApi<RuntimeError>> TransformHandler<RuntimeError> for IntentProcessorObjectsWithApi<'a, 'e, Y>
fn replace_bucket(&mut self, b: ManifestBucket) -> Result<Own, RuntimeError>
fn replace_proof(&mut self, p: ManifestProof) -> Result<Own, RuntimeError>
fn replace_address_reservation( &mut self, r: ManifestAddressReservation, ) -> Result<Own, RuntimeError>
fn replace_named_address( &mut self, a: ManifestNamedAddress, ) -> Result<Reference, RuntimeError>
fn replace_expression( &mut self, e: ManifestExpression, ) -> Result<Vec<Own>, RuntimeError>
fn replace_blob(&mut self, b: ManifestBlobRef) -> Result<Vec<u8>, RuntimeError>
impl Eq for RuntimeError
impl StructuralPartialEq for RuntimeError
impl<'a, Y: SystemBasedKernelApi> SystemApi<RuntimeError> for SystemService<'a, Y>
impl SystemApiError for RuntimeError
Auto Trait Implementations§
impl Freeze for RuntimeError
impl RefUnwindSafe for RuntimeError
impl Send for RuntimeError
impl Sync for RuntimeError
impl Unpin for RuntimeError
impl UnwindSafe for RuntimeError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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
.Source§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
.Source§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.Source§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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.