Skip to main content

Module platform

Module platform 

Source
Expand description

Platform abstractions for cross-platform async operations.

Provides unified APIs for spawning tasks, sleeping, and timeouts that work on both native (tokio) and WASM (wasm-bindgen-futures + gloo) targets.

Structs§

SpawnHandle
Handle to a spawned background task, allowing cancellation.
TimeoutError
Error returned when a timeout expires.

Functions§

sleep
Sleep for the given duration.
spawn
Spawn a future as a background task.
timeout
Run a future with a timeout.