pub trait SystemCallbackObject: Sized {
type Init: InitializationParameters<For = Self>;
// Required methods
fn init(init_input: Self::Init) -> Result<Self, BootloadingError>;
fn invoke<Y: SystemApi<RuntimeError> + SystemBasedKernelInternalApi<SystemCallback = Self> + KernelNodeApi + KernelSubstateApi<SystemLockData>>(
package_address: &PackageAddress,
package_export: PackageExport,
input: &IndexedScryptoValue,
api: &mut Y,
) -> Result<IndexedScryptoValue, RuntimeError>;
}
Expand description
Callback object invoked by the system layer
Required Associated Types§
Sourcetype Init: InitializationParameters<For = Self>
type Init: InitializationParameters<For = Self>
Initialization Object
Required Methods§
Sourcefn init(init_input: Self::Init) -> Result<Self, BootloadingError>
fn init(init_input: Self::Init) -> Result<Self, BootloadingError>
Initialize and create the callback object above the system
Sourcefn invoke<Y: SystemApi<RuntimeError> + SystemBasedKernelInternalApi<SystemCallback = Self> + KernelNodeApi + KernelSubstateApi<SystemLockData>>(
package_address: &PackageAddress,
package_export: PackageExport,
input: &IndexedScryptoValue,
api: &mut Y,
) -> Result<IndexedScryptoValue, RuntimeError>
fn invoke<Y: SystemApi<RuntimeError> + SystemBasedKernelInternalApi<SystemCallback = Self> + KernelNodeApi + KernelSubstateApi<SystemLockData>>( package_address: &PackageAddress, package_export: PackageExport, input: &IndexedScryptoValue, api: &mut Y, ) -> Result<IndexedScryptoValue, RuntimeError>
Invoke a function
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.