[][src]Module mem6::fetchmod

Async world

With the new async/.await syntax in Rust it is now very easy to write async code. It is important to be careful to NOT write sync code after async code. It can be confusing that the sync code will execute before the async code ! Webassembly is basically javascript and uses the recommended executor spawn_local() or future_to_promise(). Async cannot use any references to the stack because it is executed in another timeline.

Functions

async_spwloc_fetch_text

fetch in Rust with async await for executor spawn_local() return the response as JsValue. Any error will panic.

fetch_only

fetch only, so it goes in cache

fetch_response

fetch in Rust with async await for executor spawn_local() return the response as String. Any error will panic.