Skip to main content

Module utils

Module utils 

Source

Macros§

newtype_id
Macro to create a newtyped ID that implements Idx.

Structs§

ColMatrix
CsrMatrix
Compressed Sparse Row matrix mapping row indices to variable-length data.
DenseIdMap
A dense mapping from ID to ID.
DisplayHex
A display helper for formatting a slice of bytes as hex with different options using Rust’s builtin format language
IndexVec
A dense vector indexed by ID types.
ReadAdapter
An adapter of ByteReader to any type that implements std::io::Read

Enums§

CsrValidationError
Errors that can occur during CSR validation.
IndexedVecError
Error returned when too many items are added to an IndexedVec.

Traits§

Idx
A trait for u32-backed, 0-based IDs.
IntoBytes
LookupByIdx
A trait for looking up values by ID.
Matrix
A generic trait for two-dimensional matrix-like data structures.
ToElements
ToHex
This trait represents a value that can be converted to a string of hexadecimal digits which represent the raw byte encoding of that value.

Functions§

bound_into_included_u64
Converts and parses a Bound into an included u64 value.
bytes_to_packed_u32_elements
Converts bytes to field elements using u32 packing in little-endian format.
flatten_slice_elements
Transmutes a slice of n arrays each of length N, into a slice of N * n elements.
flatten_vector_elements
Transmutes a vector of n arrays each of length N, into a vector of N * n elements.
group_slice_elements
Transmutes a slice of n elements into a slice of n / N elements, each of which is an array of N elements.
hash_string_to_word
Hashes the provided string using the BLAKE3 hash function and converts the resulting digest into a Word.
packed_u32_elements_to_bytes
Converts u32-packed field elements back to bytes in little-endian format.
range
Returns a Range initialized with the specified start and with end set to start + len.
to_hex
Construct a String containing the hexadecimal representation of bytes
uninit_vector
Returns a vector of the specified length with un-initialized memory.

Type Aliases§

RowMajorMatrix