Module util

Source

Structs§

Chunk
FormatBytes
FormatDuration
IdFactory
A helper for constructing id types like [FunctionId][crate::FunctionId].
IdFactoryWithReuse
An IdFactory, but extended with a free list to allow for id reuse.
IntoChunks
OnceConcurrentlyMap
SafeOnceConcurrentlyMap
SharedError
A error struct that is backed by an Arc to allow cloning errors
WrapFuture
A future that wraps another future and applies a function on every poll call.

Enums§

StaticOrArc
Smart pointer that stores data either in an Arc or as a static reference.

Functions§

good_chunk_size
Calculates a good chunk size for parallel processing based on the number of available threads. This is used to ensure that the workload is evenly distributed across the threads.
into_chunks
Similar to slice::chunks but for owned data. Chunks are Send and Sync to allow to use it for parallelism.