Expand description
WASM implementation
Re-exports§
pub use super::*;
Macros§
- call_
async_ no_ send - Awaits an
asyncblock orawaitexpression whose future is notSendby dispatching it onto a local task and relaying the result back through a oneshot channel wrapped inSendable. Accepts either an async block or an await expression and propagates errors with?.
Structs§
- Interval
Intervalstream used by theinterval()function to provide a a time interval stream. The stream is backed by tokio interval stream on native platforms and by by the JavaScriptsetInterval()andclearInterval()APIs in WASM32 environment.
Functions§
- disable_
persistent_ timer_ overrides - No-op on native targets; mirrors the WASM API that disables persistent timer
overrides. Always returns
Ok(()). - dispatch
- Spawns a future onto the browser event loop without requiring it to be
Send. Likespawnbut accepts non-Sendfutures on thewasm32target; panics on non-WASM targets. - interval
async interval()function backed by the JavaScriptcreateInterval()- sleep
- Waits until
durationhas elapsed. - spawn
- Spawns a
Sendfuture onto the browser event loop on thewasm32target; panics on non-WASM targets. - yield_
now - Yields execution back to the Tokio runtime.