Expand description
Target-dependent thread bounds, boxed futures, and executor-independent timers.
use rig_http::wasm_compat::WasmBoxedFuture;
let future: WasmBoxedFuture<'_, u32> = Box::pin(async { 42 });Structs§
Traits§
- Wasm
Compat Send Non- target_family=wasm Sendon native targets, a no-op marker on browser wasm.- Wasm
Compat Sync Non- target_family=wasm Syncon native targets, a no-op marker on browser wasm.
Functions§
- sleep
- Sleep for
durationusing the native or browser timer backend oftimeout. - timeout
- Await
futureuntildurationelapses, then drop it and returnElapsed. The future is polled first, even for zero duration; cancellation runs only its drop cleanup. Uses a native timer thread or browsersetTimeout, without requiring an executor timer or a feature flag.
Type Aliases§
- Wasm
Boxed Future Non- target_family=wasm - Boxed future with
Sendon the same targets asWasmCompatSend. - Wasm
Boxed Stream Non- target_family=wasm - Boxed stream with
Sendon the same targets asWasmCompatSend.