Expand description
Core async runtime, time, and utility primitives, re-exported from the
workflow-core crate.
Modules§
- abortable
- Abortable trigger, can be used to cancel (abort) an asynchronous task.
- channel
async-channelre-exports and shims- dirs
- Access to home and data folder (windows) when running natively or within Node.js
- enums
- Rust enum conversion utilities
- env
- Access to environment variables when running natively or
on top of Node.js (via
process.env). - extensions
- Miscellaneour helper traits.
- fd
- Module for the file descriptor limit management.
- hex
- Hex serialization traits
- id
- 64-bit random identifier struct
Idthat renders its value as a base58 string - lookup
LookupHandlerprovides ability to queue multiple async requests for the same key into a group of futures that resolve upon request completion.- prelude
- The prelude module re-exports the most commonly used traits and types from the workflow_core crate.
- runtime
- Provides functions that allow to detect the runtime environment. These functions can be used to detect whether the code is running in a browser, node.js or native OS, the type of the underlying OS (Windows,Linux,MacOS,*BSD) as well as the type of a web environment (Browser or NWJS). This is useful for an application of an API to detect which environment it is operating under and subsequently restrict the functionality to the capabilities to this environment.
- sendable
- Sendable NewType for automatic Send marker wrapping of JS primitives.
- task
taskmodule provides helper functions for use with async closures that operate uniformly in native (tokio-backed) and WASM (wasm-bindgen-futures-backed) environments (i.e. a web browser).- time
timemodule provides re-export of WASM32-compatibleInstantand provides platform neutral implementations forunixtime_as_millis_u128()andunixtime_as_millis_f64().- trigger
- Trigger crate re-exports and shims
- utils
- buffer slicing and other utilities
Macros§
- cfg_if
- The main macro provided by this crate. See crate documentation for more information.
- seal
- Wraps a code block with a content hash seal, taking a seal id and a code
block (
seal!(0x1234, { ... })). The macro emits the block plus aSEALconstant and fails to compile if the block’s content no longer matches the supplied seal id, drawing attention to changes in security-sensitive code. - u8_
try_ from - Associates u8 values to each enum value and declares
a
TryFrom<u8>implementation for this enum allowing atry_from(u8)to enum conversion. - u16_
try_ from - Associates u16 values to each enum value and declares
a
TryFrom<u16>implementation for this enum allowing atry_from(u16)to enum conversion. - u32_
try_ from - Associates u32 values to each enum value and declares
a
TryFrom<u32>implementation for this enum allowing atry_from(u32)to enum conversion. - usize_
try_ from - Associates usize values to each enum value and declares
a
TryFrom<usize>implementation for this enum allowing atry_from(usize)to enum conversion.