Crate workflow_core
source ·Expand description
workflow_core
is a part of the workflow-rs
framework, subset of which is designed to function uniformally across multiple
environments including native Rust, WASM-browser and Solana OS targets.
This is a general-purpose crate that provides platform-uniform (native and WASM) abstractions for:
- async channels
- task spawn and sleep functions
- random identifiers
- async-friendly and threadsafe event triggers
- time (Instant and Duration) structs
- dynamic async_trait attribute macros
Modules
async_std::channel
re-exports and shims- Rust enum conversion utilities
- 64-bit random identifier struct
Id
that renders its value as a base58 string LookupHandler
provides ability to queue multiple async requests for the same key into a group of futures that resolve upon request completion.- re-export of
instant
crate supporting native and WASM implementations - trigger re-exports and shims
- buffer slicing and other utilities
Macros
- re-export of [
cfg_if
] crate The main macro provided by this crate. See crate documentation for more information. - Associates u8 values to each enum value and declares a
TryFrom<u8>
implementation for this enum allowing atry_from(u8)
to enum conversion. - Associates u16 values to each enum value and declares a
TryFrom<u16>
implementation for this enum allowing atry_from(u16)
to enum conversion. - Associates u32 values to each enum value and declares a
TryFrom<u32>
implementation for this enum allowing atry_from(u32)
to enum conversion. - Associates usize values to each enum value and declares a
TryFrom<usize>
implementation for this enum allowing atry_from(usize)
to enum conversion.
Attribute Macros
- dynamically configured re-export of async_trait as workflow_async_trait that imposes
Send
restriction in native (non-WASM) and removesSend
restriction in WASM builds.