Crate kaspa_utils

Source
Expand description

§Kaspa Utilities

General purpose utilities and various type extensions used across the Rusty Kaspa codebase.

Modules§

any
arc
as_slice
binary_heap
channel
expiring_cache
fd_budget
git
hashmap
hex
iter
mem_size
Defines a MemSizeEstimator trait and a companying MemMode which are used to estimate sizes of run-time objects in memory, including deep heap allocations. See struct-level docs for more details.
networking
option
refs
serde_bytes
Examples
serde_bytes_fixed
Examples
serde_bytes_fixed_ref
Examples
serde_bytes_optional
sim
Module with structs for supporting discrete event simulation in virtual time. Inspired by python’s simpy library.
sync
sysinfo
triggers
vec

Macros§

serde_impl_deser_fixed_bytes_ref
Macro to provide serde::Deserialize implementations for types $t which can be constructed from byte arrays of fixed size. The resulting structure will support deserialization from human-readable formats using hex::FromHex, as well as binary formats.
serde_impl_ser_fixed_bytes_ref
Macro to generate serde::Serialize implementation for types $t that can be referenced as a byte array of fixed size, The resulting structure will support serialization into human-readable formats using hex encoding, as well as binary formats.