Function oc_wasm_cassette::run

source ·
pub fn run<MainFuture: Future<Output = Infallible> + Sync + 'static, Main: Fn() -> MainFuture>(
    arg: i32,
    main: Main
) -> i32
Expand description

Runs the application for a period of time.

The MainFuture type is the type of future returned by the main function. The Main type is the type of the main function itself. The arg parameter is the i32 parameter that OC-Wasm passes to the top-level run function. The main parameter is the main function, which is typically an async fn. The return value should be returned from the top-level run function.

§Panics

This function panics if it is re-entered (i.e. if it is called while it is already in progress).