pub trait SystemCallbackObject: Sized {
    type InitInput: Clone;

    // Required methods
    fn init<S: BootStore>(
        store: &S,
        init_input: Self::InitInput
    ) -> Result<Self, BootloadingError>;
    fn invoke<Y>(
        package_address: &PackageAddress,
        package_export: PackageExport,
        input: &IndexedScryptoValue,
        api: &mut Y
    ) -> Result<IndexedScryptoValue, RuntimeError>
       where Y: ClientApi<RuntimeError> + KernelInternalApi<System<Self>> + KernelNodeApi + KernelSubstateApi<SystemLockData>;
}
Expand description

Invocation callback invoked by the system layer

Required Associated Types§

Required Methods§

source

fn init<S: BootStore>( store: &S, init_input: Self::InitInput ) -> Result<Self, BootloadingError>

Initialize the layer above the system with data from the substate store

source

fn invoke<Y>( package_address: &PackageAddress, package_export: PackageExport, input: &IndexedScryptoValue, api: &mut Y ) -> Result<IndexedScryptoValue, RuntimeError>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'g, W: WasmEngine + 'g, E: NativeVmExtension> SystemCallbackObject for Vm<'g, W, E>

§

type InitInput = VmInit<'g, W, E>