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 Not ( target_os=unknownand WebAssembly) Sendon native targets, a no-op marker on browser wasm.- Wasm
Compat Send Stream Not ( target_os=unknownand WebAssembly) - Streaming response bound that includes
Sendon native targets. - Wasm
Compat Sync Not ( target_os=unknownand WebAssembly) 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 Not ( target_os=unknownand WebAssembly) - Boxed future with
Sendon the same targets asWasmCompatSend. - Wasm
Boxed Stream Not ( target_os=unknownand WebAssembly) - Boxed stream with
Sendon the same targets asWasmCompatSend.