Struct SystemModuleMixer

Source
pub struct SystemModuleMixer {
    pub enabled_modules: EnabledModules,
    /* private fields */
}

Fields§

§enabled_modules: EnabledModules

Implementations§

Source§

impl SystemModuleMixer

Source

pub fn new( enabled_modules: EnabledModules, kernel_trace: KernelTraceModule, transaction_runtime: TransactionRuntimeModule, auth: AuthModule, limits: LimitsModule, costing: CostingModule, execution_trace: ExecutionTraceModule, ) -> Self

Source

pub fn is_kernel_trace_enabled(&self) -> bool

Source

pub fn is_execution_trace_enabled(&self) -> bool

Source

pub fn unpack_costing(self) -> CostingModule

Source

pub fn unpack( self, ) -> (CostingModule, TransactionRuntimeModule, ExecutionTraceModule)

Source§

impl SystemModuleMixer

Source

pub fn before_invoke( api: &mut impl SystemBasedKernelApi, invocation: &KernelInvocation<Actor>, ) -> Result<(), RuntimeError>

Source

pub fn on_execution_start( api: &mut impl SystemBasedKernelInternalApi, ) -> Result<(), RuntimeError>

Source

pub fn on_execution_finish( api: &mut impl SystemBasedKernelInternalApi, message: &CallFrameMessage, ) -> Result<(), RuntimeError>

Source

pub fn after_invoke( api: &mut impl SystemBasedKernelInternalApi, output: &IndexedScryptoValue, ) -> Result<(), RuntimeError>

Source

pub fn on_pin_node( api: &mut impl SystemBasedKernelInternalApi, node_id: &NodeId, ) -> Result<(), RuntimeError>

Source

pub fn on_allocate_node_id( api: &mut impl SystemBasedKernelInternalApi, entity_type: EntityType, ) -> Result<(), RuntimeError>

Source

pub fn on_create_node( api: &mut impl SystemBasedKernelInternalApi, event: &CreateNodeEvent<'_>, ) -> Result<(), RuntimeError>

Source

pub fn on_move_module( api: &mut impl SystemBasedKernelInternalApi, event: &MoveModuleEvent<'_>, ) -> Result<(), RuntimeError>

Source

pub fn on_drop_node( api: &mut impl SystemBasedKernelInternalApi, event: &DropNodeEvent<'_>, ) -> Result<(), RuntimeError>

Source

pub fn on_mark_substate_as_transient( api: &mut impl SystemBasedKernelInternalApi, node_id: &NodeId, partition_number: &PartitionNumber, substate_key: &SubstateKey, ) -> Result<(), RuntimeError>

Source

pub fn on_open_substate( api: &mut impl SystemBasedKernelInternalApi, event: &OpenSubstateEvent<'_>, ) -> Result<(), RuntimeError>

Source

pub fn on_read_substate( api: &mut impl SystemBasedKernelInternalApi, event: &ReadSubstateEvent<'_>, ) -> Result<(), RuntimeError>

Source

pub fn on_write_substate( api: &mut impl SystemBasedKernelInternalApi, event: &WriteSubstateEvent<'_>, ) -> Result<(), RuntimeError>

Source

pub fn on_close_substate( api: &mut impl SystemBasedKernelInternalApi, event: &CloseSubstateEvent, ) -> Result<(), RuntimeError>

Source

pub fn on_set_substate( api: &mut impl SystemBasedKernelInternalApi, event: &SetSubstateEvent<'_>, ) -> Result<(), RuntimeError>

Source

pub fn on_remove_substate( api: &mut impl SystemBasedKernelInternalApi, event: &RemoveSubstateEvent<'_>, ) -> Result<(), RuntimeError>

Source

pub fn on_scan_keys( api: &mut impl SystemBasedKernelInternalApi, event: &ScanKeysEvent<'_>, ) -> Result<(), RuntimeError>

Source

pub fn on_drain_substates( api: &mut impl SystemBasedKernelInternalApi, event: &DrainSubstatesEvent<'_>, ) -> Result<(), RuntimeError>

Source

pub fn on_scan_sorted_substates( api: &mut impl SystemBasedKernelInternalApi, event: &ScanSortedSubstatesEvent<'_>, ) -> Result<(), RuntimeError>

Source

pub fn on_get_stack_id( api: &mut impl SystemBasedKernelInternalApi, ) -> Result<(), RuntimeError>

Source

pub fn on_switch_stack( api: &mut impl SystemBasedKernelInternalApi, ) -> Result<(), RuntimeError>

Source

pub fn on_send_to_stack( api: &mut impl SystemBasedKernelInternalApi, data_len: usize, ) -> Result<(), RuntimeError>

Source

pub fn on_set_call_frame_data( api: &mut impl SystemBasedKernelInternalApi, data_len: usize, ) -> Result<(), RuntimeError>

Source

pub fn on_get_owned_nodes( api: &mut impl SystemBasedKernelInternalApi, ) -> Result<(), RuntimeError>

Source§

impl SystemModuleMixer

Source

pub fn on_call_method<Y: SystemBasedKernelApi>( api: &mut SystemService<'_, Y>, receiver: &NodeId, module_id: ModuleId, direct_access: bool, ident: &str, args: &IndexedScryptoValue, ) -> Result<NodeId, RuntimeError>

Source

pub fn on_call_method_finish<Y: SystemBasedKernelApi>( api: &mut SystemService<'_, Y>, auth_zone: NodeId, ) -> Result<(), RuntimeError>

Source

pub fn on_call_function<Y: SystemBasedKernelApi>( api: &mut SystemService<'_, Y>, blueprint_id: &BlueprintId, ident: &str, ) -> Result<NodeId, RuntimeError>

Source

pub fn on_call_function_finish<Y: SystemBasedKernelApi>( api: &mut SystemService<'_, Y>, auth_zone: NodeId, ) -> Result<(), RuntimeError>

Source

pub fn add_log( &mut self, level: Level, message: String, ) -> Result<(), RuntimeError>

Source

pub fn assert_can_add_event(&mut self) -> Result<(), RuntimeError>

Source

pub fn add_event_unchecked(&mut self, event: Event) -> Result<(), RuntimeError>

Source

pub fn checked_add_event(&mut self, event: Event) -> Result<(), RuntimeError>

Source

pub fn set_panic_message(&mut self, message: String) -> Result<(), RuntimeError>

Source

pub fn add_replacement( &mut self, old: (NodeId, ModuleId), new: (NodeId, ModuleId), )

Source

pub fn fee_reserve(&mut self) -> Option<&SystemLoanFeeReserve>

Source

pub fn costing(&self) -> Option<&CostingModule>

Source

pub fn costing_mut(&mut self) -> Option<&mut CostingModule>

Source

pub fn costing_mut_even_if_disabled(&mut self) -> &mut CostingModule

Source

pub fn limits_mut(&mut self) -> Option<&mut LimitsModule>

Source

pub fn transaction_runtime(&mut self) -> Option<&TransactionRuntimeModule>

Source

pub fn transaction_hash(&self) -> Option<Hash>

Source

pub fn generate_ruid(&mut self) -> Option<[u8; 32]>

Source

pub fn update_instruction_index(&mut self, new_index: usize)

Source

pub fn apply_execution_cost( &mut self, costing_entry: ExecutionCostingEntry<'_>, ) -> Result<(), RuntimeError>

Source

pub fn apply_finalization_cost( &mut self, costing_entry: FinalizationCostingEntry<'_>, ) -> Result<(), CostingError>

Source

pub fn apply_storage_cost( &mut self, storage_type: StorageType, size_increase: usize, ) -> Result<(), CostingError>

Source

pub fn lock_fee( &mut self, vault_id: NodeId, locked_fee: LiquidFungibleResource, contingent: bool, )

Source

pub fn events(&self) -> &Vec<Event>

Source

pub fn logs(&self) -> &Vec<(Level, String)>

Trait Implementations§

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<U> As for U

Source§

fn as_<T>(self) -> T
where T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, U> ContextualTryInto<U> for T
where U: ContextualTryFrom<T>,

Source§

impl<T> Downcast for T
where T: Any,

Source§

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>

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)

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)

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<X, Y> LabelledResolve<Y> for X
where Y: LabelledResolveFrom<X>,

Source§

fn labelled_resolve( self, resolver: &impl LabelResolver<<Y as LabelledResolvable>::ResolverOutput>, ) -> Y

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<X, Y> Resolve<Y> for X
where Y: ResolveFrom<X>,

Source§

fn resolve(self) -> Y

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.