Skip to main content

Crate bark_runtime

Crate bark_runtime 

Source
Expand description

Runtime abstractions for native and WASM compatibility.

This crate provides abstractions over async runtime functionality to support both native (tokio) and WASM (wasm-bindgen) environments.

Re-exports§

pub use cancel::CancellationToken;
pub use clock::now;
pub use clock::timestamp_secs;
pub use sleep::sleep;
pub use task::spawn;
pub use timeout::timeout;

Modules§

cancel
clock
Clock types that also work in the browser.
sleep
task
timeout

Structs§

Elapsed
Timeout error.
Instant
A measurement of a monotonically nondecreasing clock. Opaque and useful only with Duration.
SystemTime
A measurement of the system clock, useful for talking to external entities like the file system or other processes.

Constants§

UNIX_EPOCH
An anchor in time which can be used to create new SystemTime instances or learn about where in time a SystemTime lies.

Traits§

MaybeSend
A trait that requires Send on native platforms and nothing on WASM, where the runtime is single-threaded and futures often aren’t Send.
MaybeSync
A trait that requires Sync on native platforms and nothing on WASM.